Don't emit empty strings for path diagnostics when taking the default branch of a switch statement that has no label.

llvm-svn: 50242
This commit is contained in:
Ted Kremenek 2008-04-25 01:29:56 +00:00
parent ecbdf75049
commit 4dd412e022
1 changed files with 7 additions and 0 deletions

View File

@ -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;