clang-tools
4.0.0
|
Replace the pattern: More...
#include <MakeUniqueCheck.h>
Public Member Functions | |
MakeUniqueCheck (StringRef Name, ClangTidyContext *Context) | |
![]() | |
MakeSmartPtrCheck (StringRef Name, ClangTidyContext *Context, std::string makeSmartPtrFunctionName) | |
void | registerMatchers (ast_matchers::MatchFinder *Finder) final |
Override this to register AST matchers with Finder . More... | |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) final |
ClangTidyChecks that register ASTMatchers should do the actual work in here. More... | |
![]() | |
ClangTidyCheck (StringRef CheckName, ClangTidyContext *Context) | |
Initializes the check with CheckName and Context . More... | |
virtual void | registerPPCallbacks (CompilerInstance &Compiler) |
Override this to register PPCallbacks with Compiler . More... | |
DiagnosticBuilder | diag (SourceLocation Loc, StringRef Description, DiagnosticIDs::Level Level=DiagnosticIDs::Warning) |
Add a diagnostic with the check's name. More... | |
virtual void | storeOptions (ClangTidyOptions::OptionMap &Options) |
Should store all options supported by this check with their current values or default values for options that haven't been overridden. More... | |
Protected Member Functions | |
SmartPtrTypeMatcher | getSmartPointerTypeMatcher () const override |
Returns matcher that match with different smart pointer types. More... | |
![]() | |
StringRef | getCurrentMainFile () const |
Returns the main file name of the current translation unit. More... | |
LangOptions | getLangOpts () const |
Returns the language options from the context. More... | |
Additional Inherited Members | |
![]() | |
using | SmartPtrTypeMatcher = ast_matchers::internal::BindableMatcher< QualType > |
![]() | |
OptionsView | Options |
![]() | |
static const char | PointerType [] = "pointerType" |
static const char | ConstructorCall [] = "constructorCall" |
static const char | ResetCall [] = "resetCall" |
static const char | NewExpression [] = "newExpression" |
Replace the pattern:
With the C++14 version:
Definition at line 28 of file MakeUniqueCheck.h.
clang::tidy::modernize::MakeUniqueCheck::MakeUniqueCheck | ( | StringRef | Name, |
ClangTidyContext * | Context | ||
) |
Definition at line 18 of file MakeUniqueCheck.cpp.
|
overrideprotectedvirtual |
Returns matcher that match with different smart pointer types.
Requires to bind pointer type (qualType) with PointerType string declared in this class.
Implements clang::tidy::modernize::MakeSmartPtrCheck.
Definition at line 23 of file MakeUniqueCheck.cpp.
References clang::tidy::modernize::MakeSmartPtrCheck::PointerType.