]> granicus.if.org Git - clang/commitdiff
For default branches in switch statements with no default label, print out
authorTed Kremenek <kremenek@apple.com>
Tue, 22 Apr 2008 22:29:46 +0000 (22:29 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 22 Apr 2008 22:29:46 +0000 (22:29 +0000)
the line we are going to.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50113 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BugReporter.cpp

index be1c52d52171bacf15a7115540b36d20ec14f5b9..68b6ad76be11395f2e9800080d242829265c2b1f 100644 (file)
@@ -232,9 +232,7 @@ void BugReporter::GeneratePathDiagnostic(PathDiagnostic& PD,
           
           switch (S->getStmtClass()) {
             default:
-              continue;
-              
-            case Stmt::DefaultStmtClass: {
+            case Stmt::DefaultStmtClass: {              
               
               os << "Control jumps to the 'default' case at line "
                  << SMgr.getLogicalLineNumber(S->getLocStart()) << ".\n";