[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-05-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D148505#4356951 , @erichkeane wrote: > I'm still on the fence. I think properly documenting all of this entire > attribute would make me more comfortable here, particularly since it will > allow GCC to follow us easil

[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-05-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I'm still on the fence. I think properly documenting all of this entire attribute would make me more comfortable here, particularly since it will allow GCC to follow us easily some day. I think that would move the needle for me. Comment at: clang

[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-05-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D148505#4331647 , @sberg wrote: > In D148505#4302702 , @aaron.ballman > wrote: > >> Thank you for poking on this! FWIW, I don't know that there's a way to >> cross-post to Disco

[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-05-10 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. In D148505#4302702 , @aaron.ballman wrote: > Thank you for poking on this! FWIW, I don't know that there's a way to > cross-post to Discourse (but if I'm wrong and there is, I'd love to know > how!). Ping, any further input from

[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-04-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D148505#4300483 , @sberg wrote: >> But the fact that these two attributes already confuse users (AND we've got >> unused as an attribute in the mix as well, which doesn't help) means we >> should proceed with caution (a

[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-04-26 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. > But the fact that these two attributes already confuse users (AND we've got > unused as an attribute in the mix as well, which doesn't help) means we > should proceed with caution (and likely coordinate with GCC given that all > three of these attributes came from their

[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-04-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2996 let Spellings = [GCC<"warn_unused">]; - let Subjects = SubjectList<[Record]>; + let Subjects = SubjectList<[Record, CXXConstructor]>; let Documentation = [Undocumented];

[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2996 let Spellings = [GCC<"warn_unused">]; - let Subjects = SubjectList<[Record]>; + let Subjects = SubjectList<[Record, CXXConstructor]>; let Documentation = [Undocumented]; --

[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-04-17 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2996 let Spellings = [GCC<"warn_unused">]; - let Subjects = SubjectList<[Record]>; + let Subjects = SubjectList<[Record, CXXConstructor]>; let Documentation = [Undocumented]; aaron

[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:189-190 preprocessor operators now return 1 also for attributes defined by plugins. +- In C++, the ``__attribute__((warn_unused))`` can now also be used on individual + constructors, -

[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-04-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I don't see a problem with this, but the changes to the pragma tests concern me a bit, so I'd like aaron to scroll through. The Expr.cpp and Sema changes both look right to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D148505: Allow `__attribute__((warn_unused))` on individual constructors

2023-04-17 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg created this revision. sberg added a reviewer: erichkeane. Herald added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. sberg requested review of this revision. Herald added a project: clang. This takes inspiration from the standard `nodiscard` a