From cedc0e6df7ab5a35e63671d0a722739237b5f09c Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Fri, 31 May 2019 17:00:48 +0000 Subject: [PATCH] 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 --- lib/Sema/SemaExceptionSpec.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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."); } -- 2.40.0