Author: Mike Rice
Date: 2024-07-26T09:35:11-07:00
New Revision: 04133283a9f5a15fba810ed34ff445d61203fcce

URL: 
https://github.com/llvm/llvm-project/commit/04133283a9f5a15fba810ed34ff445d61203fcce
DIFF: 
https://github.com/llvm/llvm-project/commit/04133283a9f5a15fba810ed34ff445d61203fcce.diff

LOG: [clang][Sema][NFC] remove unreachable return statement (#100642)

The switch now returns in every case so the end return is unreachable.

Added: 
    

Modified: 
    clang/lib/Sema/SemaPPC.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaPPC.cpp b/clang/lib/Sema/SemaPPC.cpp
index 99f46b12e6968..5b764ed396ebc 100644
--- a/clang/lib/Sema/SemaPPC.cpp
+++ b/clang/lib/Sema/SemaPPC.cpp
@@ -93,7 +93,6 @@ bool SemaPPC::CheckPPCBuiltinFunctionCall(const TargetInfo 
&TI,
                                           unsigned BuiltinID,
                                           CallExpr *TheCall) {
   ASTContext &Context = getASTContext();
-  unsigned i = 0, l = 0, u = 0;
   bool IsTarget64Bit = TI.getTypeWidth(TI.getIntPtrType()) == 64;
   llvm::APSInt Result;
 
@@ -248,7 +247,7 @@ bool SemaPPC::CheckPPCBuiltinFunctionCall(const TargetInfo 
&TI,
     return BuiltinPPCMMACall(TheCall, BuiltinID, Types);
 #include "clang/Basic/BuiltinsPPC.def"
   }
-  return SemaRef.BuiltinConstantArgRange(TheCall, i, l, u);
+  llvm_unreachable("must return from switch");
 }
 
 // Check if the given type is a non-pointer PPC MMA type. This function is used


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to