]> granicus.if.org Git - clang/commitdiff
Don't emit empty strings for path diagnostics when taking the default branch of a...
authorTed Kremenek <kremenek@apple.com>
Fri, 25 Apr 2008 01:29:56 +0000 (01:29 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 25 Apr 2008 01:29:56 +0000 (01:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50242 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BugReporter.cpp

index 5a0e9cb90ab7ed22d64c119da83490241d6c38d2..9c55333e4c606279a4ab366f658626eb49897462 100644 (file)
@@ -322,6 +322,13 @@ void BugReporter::GeneratePathDiagnostic(PathDiagnostic& PD,
               
             }
           }
+          else {
+            
+            // FIXME: Get line number.
+            
+            os << "'Default' branch taken. "
+                  "Execution continues after switch statement.";
+          }
           
           PD.push_front(new PathDiagnosticPiece(L, os.str()));
           break;