[PATCH] D137302: [clang-tidy] Add modernize-type-traits check
Chris Cotter via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 12 12:55:24 PST 2023
ccotter added a comment.
Looks good to me - looking forward to this check!
================
Comment at: clang-tools-extra/clang-tidy/modernize/TypeTraitsCheck.cpp:170
+
+static constexpr char Bind[] = "";
+
----------------
NIT: should the bound node have some meaningful non-empty name?
================
Comment at: clang-tools-extra/clang-tidy/modernize/TypeTraitsCheck.cpp:197
+ const llvm::StringSet<> &Set) {
+ return ND->isInStdNamespace() && ND->getDeclName().isIdentifier() &&
+ Set.contains(ND->getName());
----------------
For a future release, could we add an option to allow replacing "standard type traits" defined in separate namespaces, as the [BSL library](https://github.com/bloomberg/bde/blob/main/groups/bsl/bslmf/bslmf_removereference.h#L137) does? This would be useful in my case at least.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137302/new/
https://reviews.llvm.org/D137302
More information about the cfe-commits
mailing list