[clang] 32623a3 - [clang] Marshallers.h - use move semantics for 'NodeKinds' and update possible callers to use it (#87273)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 20 02:48:01 PDT 2024
Author: Amila Senadheera
Date: 2024-04-20T10:47:57+01:00
New Revision: 32623a3fc09a87867df495ab8c059706f24a126c
URL: https://github.com/llvm/llvm-project/commit/32623a3fc09a87867df495ab8c059706f24a126c
DIFF: https://github.com/llvm/llvm-project/commit/32623a3fc09a87867df495ab8c059706f24a126c.diff
LOG: [clang] Marshallers.h - use move semantics for 'NodeKinds' and update possible callers to use it (#87273)
Fixes: https://github.com/llvm/llvm-project/issues/87248
Signed-off-by: amila <amila.15 at cse.mrt.ac.lk>
Added:
Modified:
clang/lib/ASTMatchers/Dynamic/Marshallers.h
Removed:
################################################################################
diff --git a/clang/lib/ASTMatchers/Dynamic/Marshallers.h b/clang/lib/ASTMatchers/Dynamic/Marshallers.h
index c76ddf17b719d4..0e640cbada7268 100644
--- a/clang/lib/ASTMatchers/Dynamic/Marshallers.h
+++ b/clang/lib/ASTMatchers/Dynamic/Marshallers.h
@@ -937,7 +937,7 @@ class MapAnyOfMatcherDescriptor : public MatcherDescriptor {
public:
MapAnyOfMatcherDescriptor(ASTNodeKind CladeNodeKind,
std::vector<ASTNodeKind> NodeKinds)
- : CladeNodeKind(CladeNodeKind), NodeKinds(NodeKinds) {}
+ : CladeNodeKind(CladeNodeKind), NodeKinds(std::move(NodeKinds)) {}
VariantMatcher create(SourceRange NameRange, ArrayRef<ParserValue> Args,
Diagnostics *Error) const override {
@@ -1026,7 +1026,7 @@ class MapAnyOfBuilderDescriptor : public MatcherDescriptor {
}
return std::make_unique<MapAnyOfMatcherDescriptor>(CladeNodeKind,
- NodeKinds);
+ std::move(NodeKinds));
}
bool isVariadic() const override { return true; }
More information about the cfe-commits
mailing list