[PATCH] D73495: [CodeGen] Attach no-builtin attributes to function definitions with no Decl

2020-01-28 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. Thx for the fix @thegameg Comment at: clang/lib/CodeGen/CGCall.cpp:1845 + + // First, handle the language options passed through -fno-builtin[-] + if (LangOpts.NoBuiltin) { Can you remove the trailing `[-]`? Repository: rG LLVM

[PATCH] D73495: [CodeGen] Attach no-builtin attributes to function definitions with no Decl

2020-01-28 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4e799ada5860: [CodeGen] Attach no-builtin attributes to function definitions with no Decl (authored by thegameg). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D73495: [CodeGen] Attach no-builtin attributes to function definitions with no Decl

2020-01-28 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM There's maybe some argument that we should be calling getNonClosureContext() or something like that to find the parent function, at least for some attributes. But that seems less cr

[PATCH] D73495: [CodeGen] Attach no-builtin attributes to function definitions with no Decl

2020-01-28 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg updated this revision to Diff 240914. thegameg added a comment. Add the attribute to all TargetDecls. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73495/new/ https://reviews.llvm.org/D73495 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGenCXX/global-init.cpp Index:

[PATCH] D73495: [CodeGen] Attach no-builtin attributes to function definitions with no Decl

2020-01-28 Thread Francis Visoiu Mistrih via Phabricator via cfe-commits
thegameg marked 2 inline comments as done. thegameg added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1917 const auto *NBA = Fn->getAttr(); -bool HasWildcard = NBA && llvm::is_contained(NBA->builtinNames(), "*"); -if (getLangOpts().NoBuiltin

[PATCH] D73495: [CodeGen] Attach no-builtin attributes to function definitions with no Decl

2020-01-27 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1917 const auto *NBA = Fn->getAttr(); -bool HasWildcard = NBA && llvm::is_contained(NBA->builtinNames(), "*"); -if (getLangOpts().NoBuiltin || HasWildcard) - FuncAttrs.addAt