@@ -38,13 +38,14 @@ allDeclRefExprsHonourLambda(const VarDecl &VarDecl, const Decl &Decl,
38
38
39
39
static llvm::SmallPtrSet<const VarDecl *, 16 >
40
40
allVarDeclsExprs (const VarDecl &VarDecl, const Decl &Decl,
41
- ASTContext &Context) {
41
+ ASTContext &Context) {
42
42
auto Matches = match (
43
- decl (forEachDescendant (
44
- declRefExpr (to (varDecl (equalsNode (&VarDecl))),
45
- hasParent (decl (varDecl (hasType (qualType (referenceType ()))).bind (" varDecl" ))),
46
- unless (hasAncestor (lambdaExpr (hasAnyCapture (lambdaCapture (
47
- capturesVar (varDecl (equalsNode (&VarDecl))))))))))),
43
+ decl (forEachDescendant (declRefExpr (
44
+ to (varDecl (equalsNode (&VarDecl))),
45
+ hasParent (decl (
46
+ varDecl (hasType (qualType (referenceType ()))).bind (" varDecl" ))),
47
+ unless (hasAncestor (lambdaExpr (hasAnyCapture (
48
+ lambdaCapture (capturesVar (varDecl (equalsNode (&VarDecl))))))))))),
48
49
Decl, Context);
49
50
llvm::SmallPtrSet<const class VarDecl *, 16 > VarDecls;
50
51
extractNodesByIdTo (Matches, " varDecl" , VarDecls);
@@ -69,13 +70,12 @@ AST_MATCHER(CXXRecordDecl, hasTrivialMoveConstructor) {
69
70
return Node.hasDefinition () && Node.hasTrivialMoveConstructor ();
70
71
}
71
72
72
- void LostStdMoveCheck::storeOptions (
73
- ClangTidyOptions::OptionMap &Opts) {
73
+ void LostStdMoveCheck::storeOptions (ClangTidyOptions::OptionMap &Opts) {
74
74
Options.store (Opts, " StrictMode" , StrictMode);
75
75
}
76
76
77
77
LostStdMoveCheck::LostStdMoveCheck (StringRef Name, ClangTidyContext *Context)
78
- : ClangTidyCheck(Name, Context),
78
+ : ClangTidyCheck(Name, Context),
79
79
StrictMode (Options.get(" StrictMode" , true )) {}
80
80
81
81
void LostStdMoveCheck::registerMatchers (MatchFinder *Finder) {
0 commit comments