Warn for NVCC compatibility if you declare a static member function or
inline function as global.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
6418 ↗ | (On Diff #45080) | There's an Extension<> tablegen class used to report various C and C++ extensions. |
6421 ↗ | (On Diff #45080) | Perhaps we should use the same message as nvcc here: |
Thank you for the review.
include/clang/Basic/DiagnosticSemaKinds.td | ||
---|---|---|
6418 ↗ | (On Diff #45080) | I'll also check that the rest of the CudaCompat warnings here shouldn't be Extension<>s. |
6421 ↗ | (On Diff #45080) | Ah, yes, given that it's not an nvcc error, we should just warn. (Or even not say anything at all; it seems like a silly warning.) |
Small diags not. LGTM otherwise.
lib/Sema/SemaDeclAttr.cpp | ||
---|---|---|
3620–3629 ↗ | (On Diff #45297) | Perhaps we should emit diagnostics on device side only. |
lib/Sema/SemaDeclAttr.cpp | ||
---|---|---|
3620–3629 ↗ | (On Diff #45297) | Hm. I don't feel strongly, but since we're talking about global functions, this seems sort of relevant for both host and device compilation? |
lib/Sema/SemaDeclAttr.cpp | ||
---|---|---|
3620–3629 ↗ | (On Diff #45297) | Host-only works, too. Printing this on both host and device is a bit too much. |