summaryrefslogtreecommitdiffstats
path: root/clang/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/Parse/ParseStmt.cpp')
-rw-r--r--clang/Parse/ParseStmt.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/Parse/ParseStmt.cpp b/clang/Parse/ParseStmt.cpp
index 27c1fa88a13..564b09722f2 100644
--- a/clang/Parse/ParseStmt.cpp
+++ b/clang/Parse/ParseStmt.cpp
@@ -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;
}
OpenPOWER on IntegriCloud