]> granicus.if.org Git - clang/commitdiff
Replace 'default' in an enum-over-a-switch with the missing list.
authorErich Keane <erich.keane@intel.com>
Fri, 31 May 2019 17:00:48 +0000 (17:00 +0000)
committerErich Keane <erich.keane@intel.com>
Fri, 31 May 2019 17:00:48 +0000 (17:00 +0000)
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

index e8f559af4da8afdbd93a60ed275d394e51e5fed9..8f3ebc29b520782610a353cfc67213fcb835e32b 100644 (file)
@@ -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.");
   }