Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-14 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257839: [CUDA] Warn undeclared identifiers in CUDA kernel calls (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D15858?vs=44933&id=44938#toc Repository: rL LLVM http://reviews

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-14 Thread Jason Henline via cfe-commits
jhen marked an inline comment as done. jhen added a comment. Thanks for the review rsmith! http://reviews.llvm.org/D15858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-14 Thread Jason Henline via cfe-commits
jhen updated this revision to Diff 44933. jhen added a comment. - Add extra test for OK parameter pack http://reviews.llvm.org/D15858 Files: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h lib/AST/Expr.cpp test/SemaCUDA/cxx11-kernel-call.cu test/SemaCUDA/kernel-call.cu Index: te

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-14 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. LGTM, thanks! Comment at: test/SemaCUDA/cxx11-kernel-call.cu:8 @@ +7,3 @@ +template void k1Wrapper() { + void (*f)() = [] { k1<<>>(); }; // expected-error {{initializer contains unexpanded

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-14 Thread Jason Henline via cfe-commits
jhen added a comment. rsmith, I think the patch is ready to be committed. Please take a look if you have a moment. Thanks for your help. http://reviews.llvm.org/D15858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-11 Thread Jason Henline via cfe-commits
jhen updated this revision to Diff 44538. jhen added a comment. - Handle unexpanded parameter packs The changes for instantiation dependence also fix a bug with unexpanded parameter packs, so add a unit test for unexpanded parameter packs as well. http://reviews.llvm.org/D15858 Files: inc

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/ExprCXX.h:180 @@ +179,3 @@ +assert( +!getConfig() && +"CUDAKernelCallExpr.setConfig can only be called once per instance."); My preference would be to pass the `CallExpr` constructor a

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Jason Henline via cfe-commits
jhen updated this revision to Diff 44167. jhen added a comment. - Use config ptr itself rather than boolean flag http://reviews.llvm.org/D15858 Files: include/clang/AST/ExprCXX.h lib/AST/Expr.cpp test/SemaCUDA/kernel-call.cu Index: test/SemaCUDA/kernel-call.cu ===

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Jason Henline via cfe-commits
jhen added inline comments. Comment at: include/clang/AST/ExprCXX.h:181 @@ +180,3 @@ +assert( +!IsConfigSet && +"CUDAKernelCallExpr.setConfig can only be called once per instance."); rsmith wrote: > Perhaps `assert(!getPreArg(CONFIG))` instead

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/ExprCXX.h:181 @@ +180,3 @@ +assert( +!IsConfigSet && +"CUDAKernelCallExpr.setConfig can only be called once per instance."); Perhaps `assert(!getPreArg(CONFIG))` instead of storing a s

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Jason Henline via cfe-commits
jhen marked an inline comment as done. Comment at: test/SemaCUDA/kernel-call.cu:27 @@ -26,1 +26,3 @@ + + g1<<>>(42); // expected-error {{use of undeclared identifier 'undeclared'}} } rsmith wrote: > jhen wrote: > > Thanks for bringing this up. While trying to f

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Jason Henline via cfe-commits
jhen updated this revision to Diff 44143. jhen added a comment. - Assert setConfig only called once http://reviews.llvm.org/D15858 Files: include/clang/AST/ExprCXX.h test/SemaCUDA/kernel-call.cu Index: test/SemaCUDA/kernel-call.cu ===

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Jason Henline via cfe-commits
jhen marked 2 inline comments as done. jhen added a comment. http://reviews.llvm.org/D15858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: include/clang/AST/ExprCXX.h:175 @@ +174,3 @@ + void setConfig(CallExpr *E) { +setPreArg(CONFIG, E); +setInstantiationDependent(isInstantiationDependent() || Can you assert that the argument is only set once h

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Jason Henline via cfe-commits
jhen added inline comments. Comment at: test/SemaCUDA/kernel-call.cu:27 @@ -26,1 +26,3 @@ + + g1<<>>(42); // expected-error {{use of undeclared identifier 'undeclared'}} } Thanks for bringing this up. While trying to find tests that dealt with each dependence

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Looks sane to me, although I have no idea what I'm doing here; you should probably get someone else's approval. http://reviews.llvm.org/D15858 _

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-06 Thread Jason Henline via cfe-commits
jhen updated this revision to Diff 44131. jhen added a reviewer: jlebar. jhen removed a subscriber: jlebar. jhen added a comment. - Correct dependence info in CUDA kernel call AST This patch removes the propagation of type and value dependence and the propagation of information on unexpanded p

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-05 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: test/SemaCUDA/kernel-call.cu:27 @@ -26,1 +26,3 @@ + + g1<<>>(42); // expected-error {{use of undeclared identifier 'undeclared'}} } We set four things in setConfig -- does this test fail if any one of them is commented

[PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-04 Thread Jason Henline via cfe-commits
jhen created this revision. jhen added reviewers: tra, jlebar. jhen added a subscriber: cfe-commits. Value, type, and instantiation dependence were not being handled correctly for CUDAKernelCallExpr AST nodes. As a result, if an undeclared identifier was used in the triple-angle-bracket kernel cal