[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 7 08:01:33 PDT 2024
================
@@ -9013,6 +9013,12 @@ def err_cuda_ovl_target : Error<
"cannot overload %select{__device__|__global__|__host__|__host__ __device__}2 function %3">;
def note_cuda_ovl_candidate_target_mismatch : Note<
"candidate template ignored: target attributes do not match">;
+def warn_offload_incompatible_redeclare : Warning<
+ "incompatible host/device attribute with redeclaration: "
+ "new declaration is %select{__device__|__global__|__host__|__host__ __device__}0 function, "
+ "old declaration is %select{__device__|__global__|__host__|__host__ __device__}1 function. "
+ "It will cause warning with nvcc">,
----------------
yxsamliu wrote:
will modify the diagnostic message
https://github.com/llvm/llvm-project/pull/77359
More information about the cfe-commits
mailing list