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
^
llvm-svn: 43349
This commit is contained in:
parent
88710ff5b8
commit
36f81fb065
|
|
@ -175,7 +175,7 @@ Parser::ExprResult Parser::ParseInitializer() {
|
||||||
// If we couldn't parse the subelement, bail out.
|
// If we couldn't parse the subelement, bail out.
|
||||||
if (SubElt.isInvalid) {
|
if (SubElt.isInvalid) {
|
||||||
InitExprsOk = false;
|
InitExprsOk = false;
|
||||||
SkipUntil(tok::r_brace);
|
SkipUntil(tok::r_brace, false, true);
|
||||||
break;
|
break;
|
||||||
} else
|
} else
|
||||||
InitExprs.push_back(SubElt.Val);
|
InitExprs.push_back(SubElt.Val);
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,12 @@ char (((( /* expected-error {{to match this '('}} */
|
||||||
*X x ] )))); /* expected-error {{expected ')'}} */
|
*X x ] )))); /* expected-error {{expected ')'}} */
|
||||||
|
|
||||||
; // expected-warning {{ISO C does not allow an extra ';' outside of a function}}
|
; // expected-warning {{ISO C does not allow an extra ';' outside of a function}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct S { void *X, *Y; };
|
||||||
|
|
||||||
|
struct S A = {
|
||||||
|
&BADIDENT, 0 /* expected-error {{use of undeclared identifier}} */
|
||||||
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue