[PATCH] D128372: [Clang-Tidy] Empty Check

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 13 03:12:11 PST 2022


MyDeveloperDay added a comment.

Ironically as an aside... looking back at the review because of the discource article.

The whole reason why I added the [[nodiscard]] checker to clang-tidy 4 years ago was to cover exactly this use case...and many others like it where users have a function which returns a boolean and takes no arguments are pointer or reference (empty() included)

https://reviews.llvm.org/D55433

Shouldn't people be using this checker to add nodiscard and let the compiler to the heavy lifting. Was there a use case as to why that solution doesn't solve this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128372



More information about the cfe-commits mailing list