]> granicus.if.org Git - clang/commitdiff
Ensure that we assert if given an unhandled value.
authorMike Stump <mrs@apple.com>
Sat, 7 Feb 2009 03:46:08 +0000 (03:46 +0000)
committerMike Stump <mrs@apple.com>
Sat, 7 Feb 2009 03:46:08 +0000 (03:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64004 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/PathDiagnostic.cpp

index 347bc922f349ac7a9cc0ececdc31b958797d93eb..4fa88ed595b4a2f1d97f5347c18048843e98a249 100644 (file)
@@ -29,6 +29,7 @@ void PathDiagnosticClient::HandleDiagnostic(Diagnostic::Level DiagLevel,
   
   const char *LevelStr;
   switch (DiagLevel) {
+  default:
   case Diagnostic::Ignored: assert(0 && "Invalid diagnostic type");
   case Diagnostic::Note:    LevelStr = "note: "; break;
   case Diagnostic::Warning: LevelStr = "warning: "; break;