clang-tools
15.0.0git
|
Replace the pattern: More...
#include <MakeUniqueCheck.h>
Public Member Functions | |
MakeUniqueCheck (StringRef Name, ClangTidyContext *Context) | |
![]() | |
MakeSmartPtrCheck (StringRef Name, ClangTidyContext *Context, StringRef MakeSmartPtrFunctionName) | |
void | registerMatchers (ast_matchers::MatchFinder *Finder) final |
Override this to register AST matchers with Finder . More... | |
void | registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override |
Override this to register PPCallbacks in the preprocessor. More... | |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) final |
ClangTidyChecks that register ASTMatchers should do the actual work in here. More... | |
void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
Should store all options supported by this check with their current values or default values for options that haven't been overridden. More... | |
![]() | |
ClangTidyCheck (StringRef CheckName, ClangTidyContext *Context) | |
Initializes the check with CheckName and Context . More... | |
DiagnosticBuilder | diag (SourceLocation Loc, StringRef Description, DiagnosticIDs::Level Level=DiagnosticIDs::Warning) |
Add a diagnostic with the check's name. More... | |
DiagnosticBuilder | diag (StringRef Description, DiagnosticIDs::Level Level=DiagnosticIDs::Warning) |
Add a diagnostic with the check's name. More... | |
DiagnosticBuilder | configurationDiag (StringRef Description, DiagnosticIDs::Level Level=DiagnosticIDs::Warning) const |
Adds a diagnostic to report errors in the check's configuration. More... | |
Protected Member Functions | |
SmartPtrTypeMatcher | getSmartPointerTypeMatcher () const override |
Returns matcher that match with different smart pointer types. More... | |
bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
Returns whether the C++ version is compatible with current check. More... | |
![]() | |
StringRef | getCurrentMainFile () const |
Returns the main file name of the current translation unit. More... | |
const LangOptions & | getLangOpts () const |
Returns the language options from the context. More... | |
bool | areDiagsSelfContained () const |
Returns true when the check is run in a use case when only 1 fix will be applied at a time. More... | |
Additional Inherited Members | |
![]() | |
using | SmartPtrTypeMatcher = ast_matchers::internal::BindableMatcher< QualType > |
![]() | |
OptionsView | Options |
![]() | |
static const char | PointerType [] = "pointerType" |
Replace the pattern:
With the C++14 version:
Definition at line 27 of file MakeUniqueCheck.h.
clang::tidy::modernize::MakeUniqueCheck::MakeUniqueCheck | ( | StringRef | Name, |
ClangTidyContext * | Context | ||
) |
Definition at line 17 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.
|
overrideprotectedvirtual |
Returns whether the C++ version is compatible with current check.
Reimplemented from clang::tidy::modernize::MakeSmartPtrCheck.
Definition at line 39 of file MakeUniqueCheck.cpp.
References LangOpts.