[PATCH] D11950: [CUDA] Check register names on appropriate side of cuda compilation only.
Eli Bendersky via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 12:30:55 PDT 2015
eliben added inline comments.
================
Comment at: lib/Sema/SemaDecl.cpp:5944
@@ -5943,3 +5943,3 @@
ProcessDeclAttributes(S, NewVD, D);
-
+ bool ShouldHandleTargetErrors = DeclAttrsMatchCUDAMode(getLangOpts(), NewVD);
if (getLangOpts().CUDA) {
----------------
Since this is a CUDA-only thing, ShouldHandleTargetErrors can perhaps be named better. The checks you added are very selective now - some diags are disabled, some are not. It's not clear why some fall under the "should handle target error" umbrella. A clearer name like MatchingCUDAMode or something of the sort, may help?
================
Comment at: lib/Sema/SemaDecl.cpp:5971
@@ -5970,3 +5970,3 @@
// Handle GNU asm-label extension (encoded as an attribute).
if (Expr *E = (Expr*)D.getAsmLabel()) {
// The parser guarantees this is a string.
----------------
Do we plan to support this for CUDA at all? Why not disable here on top?
http://reviews.llvm.org/D11950
More information about the cfe-commits
mailing list