This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Disallow variadic functions other than printf in device code.
ClosedPublic

Authored by jlebar on Jan 22 2016, 12:58 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 45730.Jan 22 2016, 12:58 PM
jlebar retitled this revision from to [CUDA] Disallow variadic functions other than printf in device code..
jlebar updated this object.
jlebar added a reviewer: tra.
jlebar added subscribers: jhen, echristo, cfe-commits.
tra accepted this revision.Jan 22 2016, 1:13 PM
tra edited edge metadata.

Small nit. LGTM otherwise.

lib/Sema/SemaDecl.cpp
8291–8293 ↗(On Diff #45730)

It would be nice to emit this diagnostics on one side of compilation only.

Nit - unneeded {}

This revision is now accepted and ready to land.Jan 22 2016, 1:13 PM
jlebar updated this revision to Diff 45736.Jan 22 2016, 1:39 PM
jlebar marked an inline comment as done.
jlebar edited edge metadata.

Add check for extern "C" printf -- we don't want to take just any printf!

lib/Sema/SemaDecl.cpp
8291–8293 ↗(On Diff #45730)

Resolved irl.

This revision was automatically updated to reflect the committed changes.
cfe/trunk/lib/Sema/SemaDecl.cpp