Browse Source

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
Erich Keane 6 years ago
parent
commit
cedc0e6df7
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lib/Sema/SemaExceptionSpec.cpp

+ 5 - 1
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.");
   }