[clang] [clang][Tooling] Fix assertion failure when processing CUDA files (PR #173762)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 12 07:37:32 PST 2026
================
@@ -85,6 +85,13 @@ TEST(runToolOnCode, CudaSyntaxOnly) {
"-nocudainc"}));
}
+TEST(runToolOnCode, CudaMultipleArchs) {
+ EXPECT_TRUE(runToolOnCodeWithArgs(
+ std::make_unique<TestAction>(std::make_unique<clang::ASTConsumer>()), "",
+ {"-fsyntax-only", "-x", "cuda", "--offload-arch=sm_70,sm_80",
+ "-nocudalib", "-nocudainc"}));
----------------
jhuber6 wrote:
We should probably test both configurations, one architecture and multiple. They actrually have slightly different semantics because `-o` is forbidden with more than one.
https://github.com/llvm/llvm-project/pull/173762
More information about the cfe-commits
mailing list