From: David Majnemer Date: Tue, 14 Jun 2011 15:24:38 +0000 (+0000) Subject: Remove the Fix-it for missing statement in switches X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63f04ab297157c5905975e8f2c807b35251dace7;p=clang Remove the Fix-it for missing statement in switches git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132994 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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(); }