[libcxx-commits] [PATCH] D108080: [libcxx] simplifies nodiscard by permanently enabling the attribute...

Christopher Di Bella via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 16 12:21:30 PDT 2021


cjdb added a comment.

In D108080#2947617 <https://reviews.llvm.org/D108080#2947617>, @Mordante wrote:

> I had a talk with the MSVC STL folks at discord since they have more experience in using `[[nodiscard]]` liberally. Their experience takes away my concerns. I think it would still be good to see whether this patch can be tested on a larger code base, chromium for example to see whether it has false positives.

You read my mind. Since I'm in no hurry to merge this patch, how about I test it on various Google codebases and see what breaks? That's at least half a billion lines of code (probably more) that we can get data from. Doing that takes a bit of time, so don't expect an answer before the end of the week.  Since I'm heavily biased against anything other than `_LIBCPP_NODISCARD`, I don't think I should be the one to set what we should consider statistically significant, but I'm going to offer 0.001% of the codebase as a starting threshold (if my estimate is accurate then that's 5k offences). If you think that percentage is too high or too low, let me know and we can discuss (preferably on Discord).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108080/new/

https://reviews.llvm.org/D108080



More information about the libcxx-commits mailing list