[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 25 05:09:58 PDT 2019


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp:41-42
   void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
+    CheckFactories.registerCheck<UpgradeGoogletestCaseCheck>(
+        "google-upgrade-googletest-case");
     CheckFactories.registerCheck<build::ExplicitMakePairCheck>(
----------------
Please keep this sorted alphabetically.


================
Comment at: clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp:20
+static const llvm::StringRef CheckMessage =
+    "Googletest APIs named with 'case' are deprecated; use equivalent APIs "
+    "named with 'suite'";
----------------
Should this be spelled `Google Test` instead?


================
Comment at: clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp:107-108
+                                                     Preprocessor *) {
+  PP->addPPCallbacks(
+      llvm::make_unique<UpgradeGoogletestCasePPCallback>(this, PP));
+}
----------------
No need to register this unless in C++ mode.


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

https://reviews.llvm.org/D62977





More information about the cfe-commits mailing list