Skip to content

Commit

Permalink
[clang] Marshallers.h - use move semantics for 'NodeKinds' and update…
Browse files Browse the repository at this point in the history
… possible callers to use it (#87273)

Fixes: #87248

Signed-off-by: amila <amila.15@cse.mrt.ac.lk>
  • Loading branch information
Amila-Rukshan committed Apr 20, 2024
1 parent 29312d3 commit 32623a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/lib/ASTMatchers/Dynamic/Marshallers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -1026,7 +1026,7 @@ class MapAnyOfBuilderDescriptor : public MatcherDescriptor {
}

return std::make_unique<MapAnyOfMatcherDescriptor>(CladeNodeKind,
NodeKinds);
std::move(NodeKinds));
}

bool isVariadic() const override { return true; }
Expand Down

0 comments on commit 32623a3

Please sign in to comment.