From: Mike Stump Date: Sat, 7 Feb 2009 03:46:08 +0000 (+0000) Subject: Ensure that we assert if given an unhandled value. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e87f5c12bea6277f1b4790028f2cb16d0a2f016c;p=clang Ensure that we assert if given an unhandled value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64004 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/PathDiagnostic.cpp b/lib/Analysis/PathDiagnostic.cpp index 347bc922f3..4fa88ed595 100644 --- a/lib/Analysis/PathDiagnostic.cpp +++ b/lib/Analysis/PathDiagnostic.cpp @@ -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;