[PATCH] D38171: Implement clang-tidy check aliases.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 22 05:58:39 PDT 2017
aaron.ballman added a comment.
Thank you for working on this -- it's very nice functionality!
================
Comment at: clang-tidy/cert/CERTTidyModule.cpp:79
+ void addWarningCheckAliases(
+ llvm::DenseMap<unsigned, llvm::StringRef> &WarningCheckAliases) {
+ WarningCheckAliases.insert(
----------------
You should declare this as `override`.
================
Comment at: clang-tidy/cert/CERTTidyModule.cpp:80-82
+ WarningCheckAliases.insert(
+ {diag::warn_exception_caught_by_earlier_handler, "cert-err54-cpp"});
+ WarningCheckAliases.insert(
----------------
Can you use `try_emplace()` instead of `insert()` -- this removes the need for the braced initializers to create the pair.
================
Comment at: clang-tidy/cert/CERTTidyModule.cpp:83
+ WarningCheckAliases.insert(
+ {diag::ext_offsetof_non_standardlayout_type, "cert-exp59-cpp"});
+ }
----------------
This check also needs a test case.
https://reviews.llvm.org/D38171
More information about the cfe-commits
mailing list