[clang] [CUDA][HIP] warn incompatible redeclare (PR #77359)

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 6 14:05:42 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<
----------------
Artem-B wrote:

We should have some sort of umbrella warning option for nvcc compatibility. Function overloads are the primary source of the differences, but we have other differences that the users may want to know about. E.g. some of the compiler builtins would be different. There are probably other things. 

This option is fine, for now.

Also, we should document it.

https://github.com/llvm/llvm-project/pull/77359


More information about the cfe-commits mailing list