[PATCH] D111228: [clang-tidy] Add options to bugprone-unused-return-value.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 6 11:05:00 PDT 2021
aaron.ballman added a comment.
I think this is missing changes to the documentation as well.
In D111228#3045319 <https://reviews.llvm.org/D111228#3045319>, @balazske wrote:
> These options are added to make the configuration more comfortable if only functions are to be added or removed from the list. I plan another commit that extends the list of checked functions significantly (to include all or some of the functions listed in CERT ERR33-C <https://wiki.sei.cmu.edu/confluence/display/c/ERR33-C.+Detect+and+handle+standard+library+errors>) (but after looking at D76083 <https://reviews.llvm.org/D76083> I am not sure).
Personally, I think that would be very useful. One possible approach if there's concerns over adding that list in bugprone would be to add an alias to this check named `cert-err33-c` and have its default configuration include the listed functions.
================
Comment at: clang-tools-extra/clang-tidy/bugprone/UnusedReturnValueCheck.cpp:33
+const std::string DefaultCheckedFunctions = "::std::async;"
+ "::std::launder;"
----------------
Any reason not to use `StringRef` here given that it's a constant list?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111228/new/
https://reviews.llvm.org/D111228
More information about the cfe-commits
mailing list