r304997 - Added llvm_unreachable to make sure the switch is always exhaustive.

Galina Kistanova via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 8 11:20:33 PDT 2017


Author: gkistanova
Date: Thu Jun  8 13:20:32 2017
New Revision: 304997

URL: http://llvm.org/viewvc/llvm-project?rev=304997&view=rev
Log:
Added llvm_unreachable to make sure the switch is always exhaustive.

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

Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=304997&r1=304996&r2=304997&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Thu Jun  8 13:20:32 2017
@@ -7622,6 +7622,7 @@ Sema::CheckSpecializationInstantiationRe
 
       return true;
     }
+    llvm_unreachable("The switch over PrevTSK must be exhaustive.");
 
   case TSK_ExplicitInstantiationDeclaration:
     switch (PrevTSK) {




More information about the cfe-commits mailing list