diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-25 01:29:56 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-25 01:29:56 +0000 |
commit | 567839273dfc395a459cbe77d5f8d128b9ae85bf (patch) | |
tree | 9da3d1885e63121b03a2b11c4f9b3dfa53319696 /lib/Analysis/BugReporter.cpp | |
parent | 910e999c19dfcad3ae2a649e08e616525cef0af3 (diff) |
Don't emit empty strings for path diagnostics when taking the default branch of a switch statement that has no label.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50242 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r-- | lib/Analysis/BugReporter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 5a0e9cb90a..9c55333e4c 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -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; |