36 std::vector<std::unique_ptr<ClangTidyCheck>>
Checks;
38 for (
const auto &[CheckName, Factory] : Factories) {
41 std::unique_ptr<ClangTidyCheck> Check = Factory(CheckName, Context);
42 if (Check->isLanguageVersionSupported(LO))
43 Checks.push_back(std::move(Check));
static cl::opt< std::string > Checks("checks", desc(R"(
Comma-separated list of globs with optional '-'
prefix. Globs are processed in order of
appearance in the list. Globs without '-'
prefix add checks with matching names to the
set, globs with the '-' prefix remove checks
with matching names from the set of enabled
checks. This option's value is appended to the
value of the 'Checks' option in .clang-tidy
file, if any.
)"), cl::init(""), cl::cat(ClangTidyCategory))
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
bool isCheckEnabled(StringRef CheckName) const
Returns true if the check is enabled for the CurrentFile.
const LangOptions & getLangOpts() const
Gets the language options from the AST context.