Re: [PATCH] D16484: [CUDA] Disallow variadic functions other than printf in device code.

2016-01-23 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL258643: [CUDA] Disallow variadic functions other than printf in device code. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16484?vs=45736&id=45811#toc Repository: rL LLVM h

Re: [PATCH] D16484: [CUDA] Disallow variadic functions other than printf in device code.

2016-01-22 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 45736. jlebar marked an inline comment as done. jlebar added a comment. Add check for extern "C" printf -- we don't want to take just any printf! http://reviews.llvm.org/D16484 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp tes

Re: [PATCH] D16484: [CUDA] Disallow variadic functions other than printf in device code.

2016-01-22 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Sema/SemaDecl.cpp:8291-8293 @@ +8290,5 @@ +// in device-side CUDA code. +if (NewFD->isVariadic() && (NewFD->hasAttr() || +NewFD->hasAttr()) && +!(II && II->isStr("printf") && !D.isFunctio

Re: [PATCH] D16484: [CUDA] Disallow variadic functions other than printf in device code.

2016-01-22 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Small nit. LGTM otherwise. Comment at: lib/Sema/SemaDecl.cpp:8291-8293 @@ +8290,5 @@ +// in device-side CUDA code. +if (NewFD->isVariadic() && (NewFD->hasAttr() || +

[PATCH] D16484: [CUDA] Disallow variadic functions other than printf in device code.

2016-01-22 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: jhen, echristo, cfe-commits. http://reviews.llvm.org/D16484 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaCUDA/va-arg.cu test/SemaCUDA/vararg.cu Index: test/SemaCUDA/v