summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/BugReporter.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-22 22:29:46 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-22 22:29:46 +0000
commit0224ac57e0be1989f21ee8245048823adf26d016 (patch)
treef9cd034f8b3ef20e7df631a556f6a80b550d9524 /clang/lib/Analysis/BugReporter.cpp
parent3b427159301c60cdb8fd4751a4fb923387e9b1fa (diff)
downloadbcm5719-llvm-0224ac57e0be1989f21ee8245048823adf26d016.tar.gz
bcm5719-llvm-0224ac57e0be1989f21ee8245048823adf26d016.zip
For default branches in switch statements with no default label, print out
the line we are going to. llvm-svn: 50113
Diffstat (limited to 'clang/lib/Analysis/BugReporter.cpp')
-rw-r--r--clang/lib/Analysis/BugReporter.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp
index be1c52d5217..68b6ad76be1 100644
--- a/clang/lib/Analysis/BugReporter.cpp
+++ b/clang/lib/Analysis/BugReporter.cpp
@@ -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";
OpenPOWER on IntegriCloud