[PATCH] D129835: [clang] adds a discardable attribute

2023-04-21 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Yeah, in retrospect, I agree (and may need to clean up a few iterator types now, grr). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129835/new/ https://reviews.llvm.org/D129835 __

[PATCH] D129835: [clang] adds a discardable attribute

2023-04-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D129835#4288240 , @aaron.ballman wrote: > In D129835#4287866 , @cjdb wrote: > With [[discardable]] one just needs to push/pop at the extremes of a file (and if a future v

[PATCH] D129835: [clang] adds a discardable attribute

2023-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: erichkeane. aaron.ballman added a comment. In D129835#4287866 , @cjdb wrote: >>> With [[discardable]] one just needs to push/pop at the extremes of a file >>> (and if a future version of module maps supports global pragmas

[PATCH] D129835: [clang] adds a discardable attribute

2023-04-21 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. >> With [[discardable]] one just needs to push/pop at the extremes of a file >> (and if a future version of module maps supports global pragmas for a >> module, there too, but that's a discussion that requires a design doc). > > I understood that, I just don't think that's

[PATCH] D129835: [clang] adds a discardable attribute

2022-07-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D129835#3655548 , @cjdb wrote: > In D129835#3655487 , @aaron.ballman > wrote: > >>> When we have a function that can have its value discarded, we can use >>> [[clang::discardabl

[PATCH] D129835: [clang] adds a discardable attribute

2022-07-15 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a subscriber: ldionne. cjdb added a comment. In D129835#3655487 , @aaron.ballman wrote: >> When we have a function that can have its value discarded, we can use >> [[clang::discardable]] to indicate that the `[[nodiscard]]` attribute should

[PATCH] D129835: [clang] adds a discardable attribute

2022-07-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > When we have a function that can have its value discarded, we can use > [[clang::discardable]] to indicate that the `[[nodiscard]]` attribute should > be ignored. Alternatively, you can scope the pragma and declarations appropriately and then we don't need to a

[PATCH] D129835: [clang] adds a discardable attribute

2022-07-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 444890. cjdb added a comment. undoes editor autotrimming of spaces Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129835/new/ https://reviews.llvm.org/D129835 Files: clang/docs/ReleaseNotes.rst clang/include/c

[PATCH] D129835: [clang] adds a discardable attribute

2022-07-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Although the default behaviour for C and C++ is to not