@@ -15,8 +15,8 @@ using namespace clang::ast_matchers;
15
15
namespace clang ::tidy::performance {
16
16
17
17
template <typename Node>
18
- void extractNodesByIdTo (ArrayRef<BoundNodes> Matches, StringRef ID,
19
- llvm::SmallPtrSet<const Node *, 16 > &Nodes) {
18
+ static void extractNodesByIdTo (ArrayRef<BoundNodes> Matches, StringRef ID,
19
+ llvm::SmallPtrSet<const Node *, 16 > &Nodes) {
20
20
for (const BoundNodes &Match : Matches)
21
21
Nodes.insert (Match.getNodeAs <Node>(ID));
22
22
}
@@ -66,15 +66,19 @@ getLastVarUsage(const llvm::SmallPtrSet<const DeclRefExpr *, 16> &Exprs) {
66
66
return LastExpr;
67
67
}
68
68
69
+ namespace {
70
+
69
71
AST_MATCHER (CXXRecordDecl, hasTrivialMoveConstructor) {
70
72
return Node.hasDefinition () && Node.hasTrivialMoveConstructor ();
71
73
}
72
74
73
75
AST_MATCHER_P (Expr, ignoreParens, ast_matchers::internal::Matcher<Expr>,
74
- innerMatcher ) {
75
- return innerMatcher .matches (*Node.IgnoreParens (), Finder, Builder);
76
+ InnerMatcher ) {
77
+ return InnerMatcher .matches (*Node.IgnoreParens (), Finder, Builder);
76
78
}
77
79
80
+ } // namespace
81
+
78
82
void LostStdMoveCheck::storeOptions (ClangTidyOptions::OptionMap &Opts) {
79
83
Options.store (Opts, " StrictMode" , StrictMode);
80
84
}
0 commit comments