r362245 - Replace 'default' in an enum-over-a-switch with the missing list.

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri May 31 10:00:49 PDT 2019


Author: erichkeane
Date: Fri May 31 10:00:48 2019
New Revision: 362245

URL: http://llvm.org/viewvc/llvm-project?rev=362245&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Sema/SemaExceptionSpec.cpp

Modified: cfe/trunk/lib/Sema/SemaExceptionSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExceptionSpec.cpp?rev=362245&r1=362244&r2=362245&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExceptionSpec.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExceptionSpec.cpp Fri May 31 10:00:48 2019
@@ -429,7 +429,11 @@ bool Sema::CheckEquivalentExceptionSpec(
   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.");
   }
 




More information about the cfe-commits mailing list