Fix a recovery bug Fariborz and I noticed yesterday. We were producing:
method.c:4:3: error: use of undeclared identifier 'BADIDENT'
&BADIDENT, 0
^
method.c:5:2: error: expected '}'
};
^
method.c:3:14: error: to match this '{'
struct S A = {
^
now we only produce:
method.c:4:3: error: use of undeclared identifier 'BADIDENT'
&BADIDENT, 0
^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43349 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/ParseInit.cpp b/Parse/ParseInit.cpp
index 6368740..c4ecd26 100644
--- a/Parse/ParseInit.cpp
+++ b/Parse/ParseInit.cpp
@@ -175,7 +175,7 @@
// If we couldn't parse the subelement, bail out.
if (SubElt.isInvalid) {
InitExprsOk = false;
- SkipUntil(tok::r_brace);
+ SkipUntil(tok::r_brace, false, true);
break;
} else
InitExprs.push_back(SubElt.Val);