}
APValue VisitParenExpr(ParenExpr *E) { return Visit(E->getSubExpr()); }
- APValue VisitDeclRefExpr(DeclRefExpr *E) { return APValue(E, 0); }
+ APValue VisitDeclRefExpr(DeclRefExpr *E);
APValue VisitPredefinedExpr(PredefinedExpr *E) { return APValue(E, 0); }
APValue VisitCompoundLiteralExpr(CompoundLiteralExpr *E);
APValue VisitMemberExpr(MemberExpr *E);
return Result.isLValue();
}
+APValue LValueExprEvaluator::VisitDeclRefExpr(DeclRefExpr *E)
+{
+ if (!E->hasGlobalStorage())
+ return APValue();
+
+ return APValue(E, 0);
+}
+
APValue LValueExprEvaluator::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
if (E->isFileScope())
return APValue(E, 0);
unsigned int l_19 = 1;
EVAL_EXPR(14, (1 ^ l_19) && 1); // expected-error {{fields must have a constant size}}
+
+void f()
+{
+ int a;
+ EVAL_EXPR(15, (_Bool)&a); // expected-error {{fields must have a constant size}}
+}