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 | 4dd412e0228ea17c83b33781e949d16ec101b245 (patch) | |
tree | f69cc71d73d731c84da64014a462705de443ac11 /clang | |
parent | ecbdf75049f589bace23199f07f23bedcea51b62 (diff) | |
download | bcm5719-llvm-4dd412e0228ea17c83b33781e949d16ec101b245.tar.gz bcm5719-llvm-4dd412e0228ea17c83b33781e949d16ec101b245.zip |
Don't emit empty strings for path diagnostics when taking the default branch of a switch statement that has no label.
llvm-svn: 50242
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Analysis/BugReporter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp index 5a0e9cb90ab..9c55333e4c6 100644 --- a/clang/lib/Analysis/BugReporter.cpp +++ b/clang/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; |