[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-06-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Thank you for the review, I've commit in 522934da1f0c78c1de1a80d4ba14204a11f5afa8 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80836/new/

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-06-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 267606. aaron.ballman added a comment. Sorry for the back and forth, this Monday morning is not easy it seems. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80836/new/ https://reviews.llvm.org/D80836 Files:

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-06-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D80836#2064181 , @erichkeane wrote: > 1 more question, how did you arrive at the 'not supported in C' list? Did > you find some GCC docs for that (if so, please put in the commit message)? > Or did you just try them

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-06-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 267604. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Whoops, *now* I'm properly setting the bit from the record. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80836/new/ https://reviews.llvm.org/D80836

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-06-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 267603. aaron.ballman added a comment. New and improved with proper member initialization in all constructors. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80836/new/ https://reviews.llvm.org/D80836 Files:

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-06-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:65 -bool Unset; -K = Spelling.getValueAsBitOrUnset("KnownToGCC", Unset); } erichkeane wrote: > Doesn't this

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-06-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 3 inline comments as done. aaron.ballman added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:65 -bool Unset; -K = Spelling.getValueAsBitOrUnset("KnownToGCC", Unset); } erichkeane wrote: > aaron.ballman

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-06-01 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:65 -bool Unset; -K = Spelling.getValueAsBitOrUnset("KnownToGCC", Unset); } aaron.ballman wrote: > erichkeane wrote: > > Doesn't this result in 'K' being

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-06-01 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:65 -bool Unset; -K = Spelling.getValueAsBitOrUnset("KnownToGCC", Unset); } Doesn't this result in 'K' being uninitialized now? CHANGES SINCE LAST ACTION

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-05-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:87 Ret.emplace_back("CXX11", std::string(Name), "gnu", true); + if (Spelling->getValueAsBit("AllowInC")) +Ret.emplace_back("C2x", std::string(Name), "gnu", true);

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-05-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 267466. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. Updated to remove the KnownToGCC tablegen bit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80836/new/ https://reviews.llvm.org/D80836 Files:

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-05-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. In D80836#2064182 , @dblaikie wrote: > (sorry @erichkeane didn't mean to usurp your feedback by approving before it > was answered - @aaron.ballman do treat my approval as contingent on that

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-05-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:87 Ret.emplace_back("CXX11", std::string(Name), "gnu", true); + if (Spelling->getValueAsBit("AllowInC")) +Ret.emplace_back("C2x", std::string(Name), "gnu", true);

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-05-29 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. (sorry @erichkeane didn't mean to usurp your feedback by approving before it was answered - @aaron.ballman do treat my approval as contingent on that feedback being addressed as you/both see fit) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80836/new/

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-05-29 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Sounds good to me (welcome to wait for other reviews if you're looking for something more nuanced/exuperienced in this area) CHANGES SINCE LAST ACTION

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-05-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. 1 more question, how did you arrive at the 'not supported in C' list? Did you find some GCC docs for that (if so, please put in the commit message)? Or did you just try them all? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80836/new/

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-05-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. 1 comment, perhaps outside the scope of this patch. Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:87 Ret.emplace_back("CXX11", std::string(Name), "gnu", true); + if (Spelling->getValueAsBit("AllowInC")) +

[PATCH] D80836: Support GCC [[gnu::attributes]] in C2x mode

2020-05-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rsmith, erichkeane, dblaikie. Herald added a subscriber: krytarowski. GCC 10.1 introduced support for the `[[]]` style spelling of attributes in C mode. Similar to how GCC supports `__attribute__((foo))` as `[[gnu::foo]]` in