aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BugReporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r--lib/Analysis/BugReporter.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index 8274ce71ff..e6840c3ad2 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -549,12 +549,14 @@ void GRBugReporter::GeneratePathDiagnostic(PathDiagnostic& PD,
if (Stmt* S = Dst->getLabel())
switch (S->getStmtClass()) {
- default:
- assert(false && "Not a valid switch label.");
- continue;
+ default: {
+ os << "No cases match in the switch statement. "
+ "Control jumps to line "
+ << SMgr.getLogicalLineNumber(S->getLocStart()) << ".\n";
+ break;
+ }
- case Stmt::DefaultStmtClass: {
-
+ case Stmt::DefaultStmtClass: {
os << "Control jumps to the 'default' case at line "
<< SMgr.getLogicalLineNumber(S->getLocStart()) << ".\n";