Changeset View
Changeset View
Standalone View
Standalone View
clang-tidy/tool/ClangTidyMain.cpp
Show First 20 Lines • Show All 186 Lines • ▼ Show 20 Lines | |||||
Enable temporary destructor-aware analysis in | Enable temporary destructor-aware analysis in | ||||
clang-analyzer- checks. | clang-analyzer- checks. | ||||
This option overrides the value read from a | This option overrides the value read from a | ||||
.clang-tidy file. | .clang-tidy file. | ||||
)"), | )"), | ||||
cl::init(false), | cl::init(false), | ||||
cl::cat(ClangTidyCategory)); | cl::cat(ClangTidyCategory)); | ||||
/// This option allows enabling alpha checkers from the static analyzer, that | |||||
xbolva00: This option enables... | |||||
Not Done ReplyInline Actions
The current version is correct. lebedev.ri: > This option enables...
The current version is correct. | |||||
Not Done ReplyInline ActionsThere was "This option Enables.." when I commented it. xbolva00: There was "This option Enables.." when I commented it. | |||||
Not Done ReplyInline ActionsI'd reword to: This option allows enabling the experimental alpha checkers from the static analyzer. aaron.ballman: I'd reword to: This option allows enabling the experimental alpha checkers from the static… | |||||
/// are experimental. This option is set to false and not visible in help, | |||||
/// because it is highly not recommended for users. | |||||
static cl::opt<bool> AllowEnablingAlphaChecks("allow-enabling-alpha-checks", | |||||
alexfhUnsubmitted Not Done ReplyInline Actionss/checks/checkers/ (in the static analyzer's terminology) I would also make it more explicit that these are static analyzer checkers. -allow-enabling-clang-static-analyzer-alpha-checkers or something like that. The variable name could be AllowEnablingAnalyzerAlphaCheckers, for example. alexfh: s/checks/checkers/ (in the static analyzer's terminology)
I would also make it more explicit… | |||||
cl::init(false), cl::Hidden, | |||||
cl::cat(ClangTidyCategory)); | |||||
static cl::opt<std::string> ExportFixes("export-fixes", cl::desc(R"( | static cl::opt<std::string> ExportFixes("export-fixes", cl::desc(R"( | ||||
YAML file to store suggested fixes in. The | YAML file to store suggested fixes in. The | ||||
stored fixes can be applied to the input source | stored fixes can be applied to the input source | ||||
code with clang-apply-replacements. | code with clang-apply-replacements. | ||||
)"), | )"), | ||||
cl::value_desc("filename"), | cl::value_desc("filename"), | ||||
cl::cat(ClangTidyCategory)); | cl::cat(ClangTidyCategory)); | ||||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | static std::unique_ptr<ClangTidyOptionsProvider> createOptionsProvider( | ||||
} | } | ||||
ClangTidyOptions DefaultOptions; | ClangTidyOptions DefaultOptions; | ||||
DefaultOptions.Checks = DefaultChecks; | DefaultOptions.Checks = DefaultChecks; | ||||
DefaultOptions.WarningsAsErrors = ""; | DefaultOptions.WarningsAsErrors = ""; | ||||
DefaultOptions.HeaderFilterRegex = HeaderFilter; | DefaultOptions.HeaderFilterRegex = HeaderFilter; | ||||
DefaultOptions.SystemHeaders = SystemHeaders; | DefaultOptions.SystemHeaders = SystemHeaders; | ||||
DefaultOptions.AnalyzeTemporaryDtors = AnalyzeTemporaryDtors; | DefaultOptions.AnalyzeTemporaryDtors = AnalyzeTemporaryDtors; | ||||
DefaultOptions.AllowEnablingAlphaChecks = AllowEnablingAlphaChecks; | |||||
DefaultOptions.FormatStyle = FormatStyle; | DefaultOptions.FormatStyle = FormatStyle; | ||||
DefaultOptions.User = llvm::sys::Process::GetEnv("USER"); | DefaultOptions.User = llvm::sys::Process::GetEnv("USER"); | ||||
// USERNAME is used on Windows. | // USERNAME is used on Windows. | ||||
if (!DefaultOptions.User) | if (!DefaultOptions.User) | ||||
DefaultOptions.User = llvm::sys::Process::GetEnv("USERNAME"); | DefaultOptions.User = llvm::sys::Process::GetEnv("USERNAME"); | ||||
ClangTidyOptions OverrideOptions; | ClangTidyOptions OverrideOptions; | ||||
if (Checks.getNumOccurrences() > 0) | if (Checks.getNumOccurrences() > 0) | ||||
▲ Show 20 Lines • Show All 293 Lines • Show Last 20 Lines |
This option enables...