From: Ted Kremenek Date: Fri, 25 Apr 2008 01:29:56 +0000 (+0000) Subject: Don't emit empty strings for path diagnostics when taking the default branch of a... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=567839273dfc395a459cbe77d5f8d128b9ae85bf;p=clang 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 --- 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;