clang-tools 3.8.0

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

Namespaces | Macros | Functions
ClangTidy.cpp File Reference
`#include "ClangTidy.h"`
`#include "ClangTidyDiagnosticConsumer.h"`
`#include "ClangTidyModuleRegistry.h"`
`#include "clang/AST/ASTConsumer.h"`
`#include "clang/AST/ASTContext.h"`
`#include "clang/AST/Decl.h"`
`#include "clang/ASTMatchers/ASTMatchFinder.h"`
`#include "clang/Frontend/ASTConsumers.h"`
`#include "clang/Frontend/CompilerInstance.h"`
`#include "clang/Frontend/FrontendActions.h"`
`#include "clang/Frontend/FrontendDiagnostic.h"`
`#include "clang/Frontend/MultiplexConsumer.h"`
`#include "clang/Frontend/TextDiagnosticPrinter.h"`
`#include "clang/Lex/PPCallbacks.h"`
`#include "clang/Lex/Preprocessor.h"`
`#include "clang/Rewrite/Frontend/FixItRewriter.h"`
`#include "clang/Rewrite/Frontend/FrontendActions.h"`
`#include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"`
`#include "clang/Tooling/Refactoring.h"`
`#include "clang/Tooling/ReplacementsYaml.h"`
`#include "clang/Tooling/Tooling.h"`
`#include "llvm/Support/Process.h"`
`#include "llvm/Support/Signals.h"`
`#include <algorithm>`
`#include <utility>`
`#include "../../../lib/StaticAnalyzer/Checkers/Checkers.inc"`
Include dependency graph for ClangTidy.cpp:

Go to the source code of this file.

## Namespaces
| clang
| clang::tidy

## Macros
#define | GET_CHECKERS
#define | CHECKER(FULLNAME, CLASS, DESCFILE, HELPTEXT, GROUPINDEX, HIDDEN) FULLNAME,

## Functions
static void | clang::tidy::setStaticAnalyzerCheckerOpts (const ClangTidyOptions &Opts, AnalyzerOptionsRef AnalyzerOptions)
std::vector< std::string > | clang::tidy::getCheckNames (const ClangTidyOptions &Options)
| Fills the list of check names that are enabled when the provided filters are applied. More...
ClangTidyOptions::OptionMap | clang::tidy::getCheckOptions (const ClangTidyOptions &Options)
| Returns the effective check-specific options. More...
ClangTidyStats | clang::tidy::runClangTidy (std::unique_ptr< ClangTidyOptionsProvider > OptionsProvider, const tooling::CompilationDatabase &Compilations, ArrayRef< std::string > InputFiles, std::vector< ClangTidyError > *Errors, ProfileData *Profile=nullptr)
| Run a set of clang-tidy checks on a set of files. More...
void | clang::tidy::handleErrors (const std::vector< ClangTidyError > &Errors, bool Fix)
| Displays the found `Errors` to the users. More...
void | clang::tidy::exportReplacements (const std::vector< ClangTidyError > &Errors, raw_ostream &OS)
| Serializes replacements into YAML and writes them to the specified output stream. More...

## Macro Definition Documentation

#define CHECKER | ( |  | FULLNAME,
|  |  | CLASS,
|  |  | DESCFILE,
|  |  | HELPTEXT,
|  |  | GROUPINDEX,
|  |  | HIDDEN
| ) |  | FULLNAME,

#define GET_CHECKERS

## Variable Documentation

unsigned AppliedFixes

Definition at line 176 of file ClangTidy.cpp.

bool ApplyFixes

Definition at line 174 of file ClangTidy.cpp.

std::vector<std::unique_ptr<ClangTidyCheck> > Checks

Definition at line 189 of file ClangTidy.cpp.

Referenced by clang::tidy::ClangTidyASTConsumerFactory::CreateASTConsumer(), clang::tidy::ClangTidyCheckFactories::createChecks(), clang::tidy::ClangTidyASTConsumerFactory::getCheckOptions(), and clang::tidy::ClangTidyContext::setCurrentFile().

ClangTidyContext& Context

Definition at line 93 of file ClangTidy.cpp.

Referenced by clang::tidy::misc::VirtualNearMissCheck::check(), clang::tidy::readability::BracesAroundStatementsCheck::check(), clang::tidy::getCheckNames(), clang::tidy::getCheckOptions(), clang::tidy::modernize::isCopyAssignmentAndCanBeDefaulted(), clang::tidy::ClangTidyCheckFactories::registerCheck(), and clang::tidy::runClangTidy().

IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts

Definition at line 169 of file ClangTidy.cpp.

Referenced by clang::tidy::ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer(), and main().

DiagnosticConsumer* DiagPrinter

Definition at line 170 of file ClangTidy.cpp.

DiagnosticsEngine Diags

Definition at line 171 of file ClangTidy.cpp.

FileManager Files

Definition at line 167 of file ClangTidy.cpp.

Referenced by applyFormatting(), applyReplacements(), getRewrittenData(), and main().

std::unique_ptr<ast_matchers::MatchFinder> Finder

Definition at line 188 of file ClangTidy.cpp.

Referenced by clang::tidy::matchers::AST_MATCHER(), clang::tidy::AST_MATCHER(), clang::tidy::AST_MATCHER_P(), clang::tidy::modernize::LoopConvertCheck::check(), clang::tidy::ClangTidyASTConsumerFactory::CreateASTConsumer(), main(), and clang::query::MatchQuery::run().

LangOptions LangOpts

Definition at line 168 of file ClangTidy.cpp.

Referenced by clang::tidy::misc::InefficientAlgorithmCheck::check(), clang::tidy::AssertSideEffectCheck::check(), and clang::tidy::ClangTidyDiagnosticConsumer::HandleDiagnostic().

Rewriter Rewrite

Definition at line 173 of file ClangTidy.cpp.

Referenced by main().

SourceManager SourceMgr

Definition at line 172 of file ClangTidy.cpp.

Referenced by clang::rename::RenamingASTConsumer::HandleTranslationUnit(), and clang::rename::NamedDeclFindingConsumer::HandleTranslationUnit().

unsigned TotalFixes

Definition at line 175 of file ClangTidy.cpp.