[PATCH] D143843: [clang-tidy][NFC] Remove ModernizeTidyModule::getModuleOptions

Carlos Galvez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 15 02:38:54 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG45ddc157ca7c: [clang-tidy][NFC] Remove ModernizeTidyModule::getModuleOptions (authored by carlosgalvezp).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143843

Files:
  clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp
  clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp


Index: clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
===================================================================
--- clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
+++ clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
@@ -480,7 +480,7 @@
 
 UseNullptrCheck::UseNullptrCheck(StringRef Name, ClangTidyContext *Context)
     : ClangTidyCheck(Name, Context),
-      NullMacrosStr(Options.get("NullMacros", "")) {
+      NullMacrosStr(Options.get("NullMacros", "NULL")) {
   StringRef(NullMacrosStr).split(NullMacros, ",");
 }
 
Index: clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp
===================================================================
--- clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp
+++ clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp
@@ -100,23 +100,6 @@
         "modernize-use-uncaught-exceptions");
     CheckFactories.registerCheck<UseUsingCheck>("modernize-use-using");
   }
-
-  ClangTidyOptions getModuleOptions() override {
-    ClangTidyOptions Options;
-    auto &Opts = Options.CheckOptions;
-    // For types whose size in bytes is above this threshold, we prefer taking a
-    // const-reference than making a copy.
-    Opts["modernize-loop-convert.MaxCopySize"] = "16";
-
-    Opts["modernize-loop-convert.MinConfidence"] = "reasonable";
-    Opts["modernize-loop-convert.NamingStyle"] = "CamelCase";
-    Opts["modernize-pass-by-value.IncludeStyle"] = "llvm";    // Also: "google".
-    Opts["modernize-replace-auto-ptr.IncludeStyle"] = "llvm"; // Also: "google".
-
-    // Comma-separated list of macros that behave like NULL.
-    Opts["modernize-use-nullptr.NullMacros"] = "NULL";
-    return Options;
-  }
 };
 
 // Register the ModernizeTidyModule using this statically initialized variable.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143843.497606.patch
Type: text/x-patch
Size: 1817 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230215/90b15a14/attachment.bin>


More information about the cfe-commits mailing list