Author: majnemer
Date: Tue Jun 14 10:24:38 2011
New Revision: 132994

URL: http://llvm.org/viewvc/llvm-project?rev=132994&view=rev
Log:
Remove the Fix-it for missing statement in switches

Modified:
    cfe/trunk/lib/Parse/ParseStmt.cpp

Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=132994&r1=132993&r2=132994&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Tue Jun 14 10:24:38 2011
@@ -589,9 +589,8 @@
   } 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 @@
   
   // 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();
   }
 


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to