diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 8b29667bae..cf17566d41 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -9037,12 +9037,12 @@ bool Sema::CheckBooleanCondition(Expr *&E, SourceLocation Loc) { return Diag(E->getLocStart(), diag::err_invalid_use_of_bound_member_func) << E->getSourceRange(); - QualType T = E->getType(); - if (getLangOptions().CPlusPlus) return CheckCXXBooleanCondition(E); // C++ 6.4p4 DefaultFunctionArrayLvalueConversion(E); + + QualType T = E->getType(); if (!T->isScalarType()) // C99 6.8.4.1p1 return Diag(Loc, diag::err_typecheck_statement_requires_scalar) << T << E->getSourceRange(); |