From: Ted Kremenek Date: Tue, 22 Apr 2008 22:29:46 +0000 (+0000) Subject: For default branches in switch statements with no default label, print out X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b9045574329ebac6270dfab7ebadce3179bced1;p=clang For default branches in switch statements with no default label, print out the line we are going to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50113 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index be1c52d521..68b6ad76be 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/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";