[clang] 9e99a4f - [NVPTX] Fix missed test after adding alias support for NVPTX
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 7 12:35:15 PDT 2023
Author: Joseph Huber
Date: 2023-08-07T14:35:02-05:00
New Revision: 9e99a4f0db0e21b68e9aab9ad6f32f34d42eb460
URL: https://github.com/llvm/llvm-project/commit/9e99a4f0db0e21b68e9aab9ad6f32f34d42eb460
DIFF: https://github.com/llvm/llvm-project/commit/9e99a4f0db0e21b68e9aab9ad6f32f34d42eb460.diff
LOG: [NVPTX] Fix missed test after adding alias support for NVPTX
Summary:
This test was accidentally not updated.
Added:
Modified:
clang/test/SemaCUDA/alias.cu
Removed:
################################################################################
diff --git a/clang/test/SemaCUDA/alias.cu b/clang/test/SemaCUDA/alias.cu
index 39251ed10ecda0..a0350e69d7ec14 100644
--- a/clang/test/SemaCUDA/alias.cu
+++ b/clang/test/SemaCUDA/alias.cu
@@ -1,11 +1,6 @@
-// RUN: %clang_cc1 -triple nvptx-unknown-cuda -fsyntax-only -fcuda-is-device -verify -DEXPECT_ERR %s
-// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple nvptx-unknown-cuda -fsyntax-only -fcuda-is-device -target-sdk-version=9.0 -verify %s
-// The alias attribute is not allowed in CUDA device code.
-void bar();
+// The alias attribute is not allowed in CUDA device code before 10.0.
+extern "C" void bar();
__attribute__((alias("bar"))) void foo();
-#ifdef EXPECT_ERR
-// expected-error at -2 {{CUDA does not support aliases}}
-#else
-// expected-no-diagnostics
-#endif
+// expected-error at -1 {{CUDA older than 10.0 does not support .alias}}
More information about the cfe-commits
mailing list