[PATCH] D149586: [Coverity] Fix unchecked return value, NFC
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 1 22:43:11 PDT 2023
pengfei added a comment.
In D149586#4311474 <https://reviews.llvm.org/D149586#4311474>, @barannikov88 wrote:
> BTW it may be worth annotating this method (and maybe others) with `[[nodiscard]]`.
Thanks for the suggestion! That sounds a good idea to me, but I took a look at current LLVM code base and didn't find an instance that using `[[nodiscard]]` on virtual functions. A simply googling pointed me a discussion about GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84476>.
No sure if it is the reason that we haven't used it. Anyway, let's not do it for now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149586/new/
https://reviews.llvm.org/D149586
More information about the llvm-commits
mailing list