tianshilei1992 marked 2 inline comments as done.
tianshilei1992 added inline comments.


================
Comment at: clang/lib/Headers/__clang_cuda_builtin_vars.h:40
 
+#ifdef __cplusplus
 #define __CUDA_DEVICE_BUILTIN(FIELD, INTRINSIC)                                
\
----------------
tra wrote:
> Perhaps we should move all C++-related code under `#ifdef __cplusplus` intead 
> of cherry-picking them all one by one and let the compilation fail if some C 
> code references builtin vars.
Finally I decided to only include the header in C++ mode. For C mode, 
everything is unchanged, which means compilation error will still be emitted 
because the variables are not defined.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94884/new/

https://reviews.llvm.org/D94884

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to