r192728 - Add llvm_unreachable to pacify GCC's dropping off non-void function warning.

Benjamin Kramer benny.kra at googlemail.com
Tue Oct 15 11:53:19 PDT 2013


Author: d0k
Date: Tue Oct 15 13:53:18 2013
New Revision: 192728

URL: http://llvm.org/viewvc/llvm-project?rev=192728&view=rev
Log:
Add llvm_unreachable to pacify GCC's dropping off non-void function warning.

+ 80 cols fix.

Modified:
    cfe/trunk/tools/libclang/CIndex.cpp

Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=192728&r1=192727&r2=192728&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Tue Oct 15 13:53:18 2013
@@ -5844,7 +5844,8 @@ static CXAvailabilityKind getCursorAvail
   case AR_Available:
   case AR_NotYetIntroduced:
     if (const EnumConstantDecl *EnumConst = dyn_cast<EnumConstantDecl>(D))
-      return getCursorAvailabilityForDecl(cast<Decl>(EnumConst->getDeclContext()));
+      return getCursorAvailabilityForDecl(
+          cast<Decl>(EnumConst->getDeclContext()));
     return CXAvailability_Available;
 
   case AR_Deprecated:
@@ -5853,6 +5854,8 @@ static CXAvailabilityKind getCursorAvail
   case AR_Unavailable:
     return CXAvailability_NotAvailable;
   }
+
+  llvm_unreachable("Unknown availability kind!");
 }
 
 enum CXAvailabilityKind clang_getCursorAvailability(CXCursor cursor) {





More information about the cfe-commits mailing list