SourceLocation RParen) {
QualType LhsT = LhsTSInfo->getType();
QualType RhsT = RhsTSInfo->getType();
+ QualType ResultType = Context.BoolTy;
+ // __builtin_types_compatible_p is a GNU C extension, not a C++ type trait.
if (BTT == BTT_TypeCompatible) {
+ ResultType = Context.IntTy;
if (getLangOpts().CPlusPlus) {
Diag(KWLoc, diag::err_types_compatible_p_in_cplusplus)
<< SourceRange(KWLoc, RParen);
if (!LhsT->isDependentType() && !RhsT->isDependentType())
Value = EvaluateBinaryTypeTrait(*this, BTT, LhsT, RhsT, KWLoc);
- QualType ResultType = Context.BoolTy;
- // __builtin_types_compatible_p is a GNU C extension, not a C++ type trait.
- if (BTT == BTT_TypeCompatible)
- ResultType = Context.IntTy;
-
return Owned(new (Context) BinaryTypeTraitExpr(KWLoc, BTT, LhsTSInfo,
RhsTSInfo, Value, RParen,
ResultType));