tra added inline comments.

================
Comment at: clang/lib/Headers/__clang_cuda_builtin_vars.h:37
 
-#if __cplusplus >= 201103L
+#if defined(__cplusplus) && __cplusplus >= 201103L
 #define __DELETE =delete
----------------
Are there actual use cases where CUDA headers are used from a non-C++ 
compilation? I do not think they will compile with non-C++ compilation at all.

I'm curious how we managed to run into a situation where CUDA headers may be 
used w/o C++. 

I think a better fix here and other CUDA headers may be to add 
```
#if !defined(__cplusplus)
#error CUDA headers must be used from a CUDA/C++ compilation.
#endif
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130800

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

Reply via email to