the type of the expression *after* array/function decay.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120895
91177308-0d34-0410-b5e6-
96231b3b80d8
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();
(test21_help(), *ptr); // expected-error {{incomplete type 'struct Test21' where a complete type is required}}
(*ptr, test21_help()); // expected-error {{incomplete type 'struct Test21' where a complete type is required}}
}
+
+// Make sure we do function/array decay.
+void test22() {
+ if ("help")
+ (void) 0;
+
+ if (test22)
+ (void) 0;
+}
if (int *ip = ip) {
}
}
+
+// Make sure we do function/array decay.
+void test3() {
+ if ("help")
+ (void) 0;
+
+ if (test3)
+ (void) 0;
+}