Summary:
Do not ask size of type if it is dependent. ASTContext doesn't seem expecting
this.
Reviewers: jdoerfert, ABataev, bader
Reviewed By: ABataev
Subscribers: yaxunl, guansong, ebevhan, Anastasia, sstefan1, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80829
}
auto CheckType = [&](QualType Ty) {
+ if (Ty->isDependentType())
+ return;
+
if ((Ty->isFloat16Type() && !Context.getTargetInfo().hasFloat16Type()) ||
((Ty->isFloat128Type() ||
(Ty->isRealFloatingType() && Context.getTypeSize(Ty) == 128)) &&
long double qa, qb;
decltype(qa + qb) qc;
double qd[sizeof(-(-(qc * 2)))];
+
+struct A { };
+
+template <bool>
+struct A_type { typedef A type; };
+
+template <class Sp, class Tp>
+struct B {
+ enum { value = bool(Sp::value) || bool(Tp::value) };
+ typedef typename A_type<value>::type type;
+};