r243109 - Silence a "not all control paths return a value" warning from MSVC. Should also silence a -Wreturn-type warning. NFC intended.

Aaron Ballman aaron at aaronballman.com
Fri Jul 24 05:47:27 PDT 2015


Author: aaronballman
Date: Fri Jul 24 07:47:27 2015
New Revision: 243109

URL: http://llvm.org/viewvc/llvm-project?rev=243109&view=rev
Log:
Silence a "not all control paths return a value" warning from MSVC. Should also silence a -Wreturn-type warning. NFC intended.

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

Modified: cfe/trunk/lib/Sema/SemaExprObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprObjC.cpp?rev=243109&r1=243108&r2=243109&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprObjC.cpp Fri Jul 24 07:47:27 2015
@@ -187,8 +187,9 @@ static NSAPI::NSClassIdKindKind ClassKin
     // between LK_None/LK_Block and NSClassIdKindKind
     case Sema::LK_Block:
     case Sema::LK_None:
-      llvm_unreachable("LiteralKind can't be converted into a ClassKind");
+      break;
   }
+  llvm_unreachable("LiteralKind can't be converted into a ClassKind");
 }
 
 /// \brief Validates ObjCInterfaceDecl availability.





More information about the cfe-commits mailing list