fix the sizeof error recovery issue (sizeof-interface.m:attributeRuns)
by correctly propagating the fact that the type was invalid up to the
attributeRuns decl, then returning an ExprError when attributeRuns is
formed (like we do for normal declrefexprs).
llvm-svn: 69998
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 938e965..8268452 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -2579,6 +2579,7 @@
// If there was an error parsing the assignment-expression, recover.
if (NumElements.isInvalid()) {
+ D.setInvalidType(true);
// If the expression was invalid, skip it.
SkipUntil(tok::r_square);
return;