forked from OSchip/llvm-project
Catch goto's with a missing identifier, patch by Neil Booth.
llvm-svn: 40381
This commit is contained in:
parent
9c724c48ea
commit
e34b2c298a
|
@ -680,7 +680,11 @@ Parser::StmtResult Parser::ParseGotoStatement() {
|
|||
return true;
|
||||
}
|
||||
Res = Actions.ParseIndirectGotoStmt(GotoLoc, StarLoc, R.Val);
|
||||
} else {
|
||||
Diag(Tok, diag::err_expected_ident);
|
||||
return true;
|
||||
}
|
||||
|
||||
return Res;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
/* RUN: clang -parse-ast-check %s
|
||||
*/
|
||||
|
||||
void foo() {
|
||||
goto ; /* expected-error {{expected identifier}} */
|
||||
}
|
Loading…
Reference in New Issue