Skip to content

Commit 32623a3

Browse files
[clang] Marshallers.h - use move semantics for 'NodeKinds' and update possible callers to use it (#87273)
Fixes: #87248 Signed-off-by: amila <[email protected]>
1 parent 29312d3 commit 32623a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/ASTMatchers/Dynamic/Marshallers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ class MapAnyOfMatcherDescriptor : public MatcherDescriptor {
937937
public:
938938
MapAnyOfMatcherDescriptor(ASTNodeKind CladeNodeKind,
939939
std::vector<ASTNodeKind> NodeKinds)
940-
: CladeNodeKind(CladeNodeKind), NodeKinds(NodeKinds) {}
940+
: CladeNodeKind(CladeNodeKind), NodeKinds(std::move(NodeKinds)) {}
941941

942942
VariantMatcher create(SourceRange NameRange, ArrayRef<ParserValue> Args,
943943
Diagnostics *Error) const override {
@@ -1026,7 +1026,7 @@ class MapAnyOfBuilderDescriptor : public MatcherDescriptor {
10261026
}
10271027

10281028
return std::make_unique<MapAnyOfMatcherDescriptor>(CladeNodeKind,
1029-
NodeKinds);
1029+
std::move(NodeKinds));
10301030
}
10311031

10321032
bool isVariadic() const override { return true; }

0 commit comments

Comments
 (0)