diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -8646,7 +8646,6 @@ "CUDA device code does not support variadic functions">; def err_va_arg_in_device : Error< "CUDA device code does not support va_arg">; -def err_alias_not_supported_on_nvptx : Error<"CUDA does not support aliases">; def err_cuda_unattributed_constexpr_cannot_overload_device : Error< "constexpr function %0 without __host__ or __device__ attributes cannot " "overload __device__ function with same signature. Add a __host__ " diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -1992,9 +1992,6 @@ S.Diag(AL.getLoc(), diag::err_alias_not_supported_on_darwin); return; } - if (S.Context.getTargetInfo().getTriple().isNVPTX()) { - S.Diag(AL.getLoc(), diag::err_alias_not_supported_on_nvptx); - } // Aliases should be on declarations, not definitions. if (const auto *FD = dyn_cast(D)) { diff --git a/clang/test/SemaCUDA/alias.cu b/clang/test/SemaCUDA/alias.cu deleted file mode 100644 --- a/clang/test/SemaCUDA/alias.cu +++ /dev/null @@ -1,11 +0,0 @@ -// 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 - -// The alias attribute is not allowed in CUDA device code. -void bar(); -__attribute__((alias("bar"))) void foo(); -#ifdef EXPECT_ERR -// expected-error@-2 {{CUDA does not support aliases}} -#else -// expected-no-diagnostics -#endif