clang-tools 3.8.0

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

PassByValueCheck.h
Go to the documentation of this file.
1 //===--- PassByValueCheck.h - clang-tidy-------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_PASS_BY_VALUE_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_PASS_BY_VALUE_H
12
13 #include "../ClangTidy.h"
14 #include "../utils/IncludeInserter.h"
15
16 #include <memory>
17
18 namespace clang {
19 namespace tidy {
20 namespace modernize {
21
22 class PassByValueCheck : public ClangTidyCheck {
23 public:
24 PassByValueCheck(StringRef Name, ClangTidyContext *Context);
25 void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
26 void registerPPCallbacks(clang::CompilerInstance &Compiler) override;
27 void registerMatchers(ast_matchers::MatchFinder *Finder) override;
28 void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
29
30 private:
31 std::unique_ptr<IncludeInserter> Inserter;
32 const IncludeSorter::IncludeStyle IncludeStyle;
33 };
34
35 } // namespace modernize
36 } // namespace tidy
37 } // namespace clang
38
39 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_PASS_BY_VALUE_H
Name
StringHandle Name
Definition: PreprocessorTracker.cpp:525
clang::tidy::IncludeSorter::IncludeStyle
IncludeStyle
Definition: IncludeSorter.h:26
Finder
std::unique_ptr< ast_matchers::MatchFinder > Finder
Definition: ClangTidy.cpp:188
clang::tidy::modernize::PassByValueCheck
Definition: PassByValueCheck.h:22
clang::tidy::ClangTidyCheck
Base class for all clang-tidy checks.
Definition: ClangTidy.h:102
clang::tidy::modernize::PassByValueCheck::registerPPCallbacks
void registerPPCallbacks(clang::CompilerInstance &Compiler) override
Definition: PassByValueCheck.cpp:160
clang::tidy::ClangTidyOptions::OptionMap
std::map< std::string, std::string > OptionMap
Definition: ClangTidyOptions.h:82
clang::tidy::modernize::PassByValueCheck::registerMatchers
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register ASTMatchers with Finder.
Definition: PassByValueCheck.cpp:128
clang::tidy::modernize::PassByValueCheck::PassByValueCheck
PassByValueCheck(StringRef Name, ClangTidyContext *Context)
Definition: PassByValueCheck.cpp:119
Context
ClangTidyContext & Context
Definition: ClangTidy.cpp:93
clang::tidy::ClangTidyContext
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
Definition: ClangTidyDiagnosticConsumer.h:124
clang::tidy::modernize::PassByValueCheck::check
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
Definition: PassByValueCheck.cpp:171
clang::tidy::modernize::PassByValueCheck::storeOptions
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
Definition: PassByValueCheck.cpp:124
Result
const NamedDecl * Result
Definition: USRFinder.cpp:121