diff options
author | David Majnemer <david.majnemer@gmail.com> | 2011-06-14 15:24:38 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2011-06-14 15:24:38 +0000 |
commit | 63f04ab297157c5905975e8f2c807b35251dace7 (patch) | |
tree | c89a0091f54e89fb4cdba8ae9646361d66d64514 /lib/Parse/ParseStmt.cpp | |
parent | 81f9d14f0b987923b37e8e3e256cdfa71e95d4ae (diff) |
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
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r-- | lib/Parse/ParseStmt.cpp | 10 |
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(); } |