From: Erich Keane Date: Fri, 31 May 2019 17:00:48 +0000 (+0000) Subject: Replace 'default' in an enum-over-a-switch with the missing list. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cedc0e6df7ab5a35e63671d0a722739237b5f09c;p=clang Replace 'default' in an enum-over-a-switch with the missing list. This suppressed the Wswitch warning causing me to miss it and write an assertion failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362245 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaExceptionSpec.cpp b/lib/Sema/SemaExceptionSpec.cpp index e8f559af4d..8f3ebc29b5 100644 --- a/lib/Sema/SemaExceptionSpec.cpp +++ b/lib/Sema/SemaExceptionSpec.cpp @@ -429,7 +429,11 @@ bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) { case EST_NoThrow: OS <<"__attribute__((nothrow))"; break; - default: + case EST_None: + case EST_MSAny: + case EST_Unevaluated: + case EST_Uninstantiated: + case EST_Unparsed: llvm_unreachable("This spec type is compatible with none."); }