aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r--lib/Parse/ParseStmt.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index 6b4a0a4045..28b34fe89a 100644
--- a/lib/Parse/ParseStmt.cpp
+++ b/lib/Parse/ParseStmt.cpp
@@ -589,9 +589,8 @@ StmtResult Parser::ParseCaseStatement(ParsedAttributes &attrs, bool MissingCase,
} else {
// Nicely diagnose the common error "switch (X) { case 4: }", which is
// not valid.
- SourceLocation ExpectedLoc = PP.getLocForEndOfToken(ColonLoc);
- Diag(ExpectedLoc, diag::err_label_end_of_compound_statement)
- << FixItHint::CreateInsertion(ExpectedLoc, ";");
+ SourceLocation AfterColonLoc = PP.getLocForEndOfToken(ColonLoc);
+ Diag(AfterColonLoc, diag::err_label_end_of_compound_statement);
SubStmt = true;
}
@@ -635,9 +634,8 @@ StmtResult Parser::ParseDefaultStatement(ParsedAttributes &attrs) {
// Diagnose the common error "switch (X) {... default: }", which is not valid.
if (Tok.is(tok::r_brace)) {
- SourceLocation ExpectedLoc = PP.getLocForEndOfToken(ColonLoc);
- Diag(ExpectedLoc, diag::err_label_end_of_compound_statement)
- << FixItHint::CreateInsertion(ExpectedLoc, ";");
+ SourceLocation AfterColonLoc = PP.getLocForEndOfToken(ColonLoc);
+ Diag(AfterColonLoc, diag::err_label_end_of_compound_statement);
return StmtError();
}