[clang] 28eb66b - [Sema] Fix a warning

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Thu May 29 09:10:25 PDT 2025


Author: Kazu Hirata
Date: 2025-05-29T09:10:19-07:00
New Revision: 28eb66b79413950e584b2c3d8581ae5dc858d6dc

URL: https://github.com/llvm/llvm-project/commit/28eb66b79413950e584b2c3d8581ae5dc858d6dc
DIFF: https://github.com/llvm/llvm-project/commit/28eb66b79413950e584b2c3d8581ae5dc858d6dc.diff

LOG: [Sema] Fix a warning

This patch fixes:

  clang/lib/Sema/SemaSPIRV.cpp:132:3: error: default label in switch
  which covers all enumeration values
  [-Werror,-Wcovered-switch-default]

Added: 
    

Modified: 
    clang/lib/Sema/SemaSPIRV.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaSPIRV.cpp b/clang/lib/Sema/SemaSPIRV.cpp
index bd72194b905f5..c27d3fed2b990 100644
--- a/clang/lib/Sema/SemaSPIRV.cpp
+++ b/clang/lib/Sema/SemaSPIRV.cpp
@@ -129,8 +129,6 @@ static bool checkGenericCastToPtr(Sema &SemaRef, CallExpr *Call) {
     AddrSpace = SemaRef.LangOpts.isSYCL() ? LangAS::sycl_private
                                           : LangAS::opencl_private;
     break;
-  default:
-    llvm_unreachable("Invalid builtin function");
   }
   Qual.setAddressSpace(AddrSpace);
   Call->setType(SemaRef.getASTContext().getPointerType(


        


More information about the cfe-commits mailing list