[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added reviewers: tra, rnk. jlebar added a subscriber: cfe-commits. https://reviews.llvm.org/D25129 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaDeclAttr.cpp clang/test/SemaCUDA/bad-attributes.cu Index: clang/test/SemaCUDA/

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. > DiagnosticSemaKinds.td:6727 > def err_cuda_extern_shared : Error<"__shared__ variable %0 cannot be > 'extern'">; > +def err_cuda_nonglobal_constant : Error<"__constant__ variables must be

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar added inline comments. > tra wrote in DiagnosticSemaKinds.td:6727 > Nit: Technically they are allowed in namespace scope. That's still a "global variable"? Or do you think calling it such will be confusing? https://reviews.llvm.org/D25129

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Artem Belevich via cfe-commits
tra added inline comments. > jlebar wrote in DiagnosticSemaKinds.td:6727 > That's still a "global variable"? Or do you think calling it such will be > confusing? It's not clear whether you mean global storage class or global namespace. The code checks for global storage, but error message is c

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Justin Lebar via cfe-commits
jlebar added inline comments. > tra wrote in DiagnosticSemaKinds.td:6727 > It's not clear whether you mean global storage class or global namespace. > The code checks for global storage, but error message is could be interpreted > either way, IMO. > > I'll leave phrasing up to you. > It's not

[PATCH] D25129: [CUDA] Disallow __constant__ local variables.

2016-09-30 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL282986: [CUDA] Disallow __constant__ local variables. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25129?vs=73139&id=73168#toc Repository: rL LLVM https://reviews.llvm.or