Skip to content

[clang][SPIRV] Fix build issue after c474f8f #141954

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025

Conversation

Naghasan
Copy link
Contributor

Remove unneeded default label which triggers a warning with -Wcovered-switch-default

Remove unneeded default label which triggers a warning with -Wcovered-switch-default
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" backend:SPIR-V labels May 29, 2025
@llvmbot
Copy link
Member

llvmbot commented May 29, 2025

@llvm/pr-subscribers-backend-spir-v

@llvm/pr-subscribers-clang

Author: Victor Lomuller (Naghasan)

Changes

Remove unneeded default label which triggers a warning with -Wcovered-switch-default


Full diff: https://github.com/llvm/llvm-project/pull/141954.diff

1 Files Affected:

  • (modified) clang/lib/Sema/SemaSPIRV.cpp (-2)
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(

@Naghasan Naghasan changed the title Fix build issue after c474f8f [clang] Fix build issue after c474f8f May 29, 2025
@Naghasan Naghasan changed the title [clang] Fix build issue after c474f8f [clang][SPIRV] Fix build issue after c474f8f May 29, 2025
@Naghasan
Copy link
Contributor Author

Naghasan commented May 29, 2025

@farzonl @VyacheslavLevytskyy if you could approve / merge, that fix the issue reported by the bots

@Keenuts Keenuts merged commit c6893dc into llvm:main May 30, 2025
15 checks passed
@Keenuts
Copy link
Contributor

Keenuts commented May 30, 2025

thanks!

sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
Remove unneeded default label which triggers a warning with
-Wcovered-switch-default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:SPIR-V clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants