"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.
UseNullptrCheck::UseNullptrCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
- NullMacrosStr(Options.get("NullMacros", "")) {
+ NullMacrosStr(Options.get("NullMacros", "NULL")) {
StringRef(NullMacrosStr).split(NullMacros, ",");
}