[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-20 Thread via cfe-commits

github-actions[bot] wrote:



@Amila-Rukshan Congratulations on having your first Pull Request (PR) merged 
into the LLVM Project!

Your changes will be combined with recent changes from other authors, then 
tested
by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with 
a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as
the builds can include changes from many authors. It is not uncommon for your
change to be included in a build that fails due to someone else's changes, or
infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail 
[here](https://llvm.org/docs/MyFirstTypoFix.html#myfirsttypofix-issues-after-landing-your-pr).

If your change does cause a problem, it may be reverted, or you can revert it 
yourself.
This is a normal part of [LLVM 
development](https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy).
 You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are 
working as expected, well done!


https://github.com/llvm/llvm-project/pull/87273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-20 Thread Simon Pilgrim via cfe-commits

https://github.com/RKSimon closed 
https://github.com/llvm/llvm-project/pull/87273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-20 Thread Amila Senadheera via cfe-commits

Amila-Rukshan wrote:

@RKSimon I have rebased the changes

https://github.com/llvm/llvm-project/pull/87273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-20 Thread Amila Senadheera via cfe-commits

https://github.com/Amila-Rukshan updated 
https://github.com/llvm/llvm-project/pull/87273

>From d85a9656d72e6380171f25c79cb4454b694286da Mon Sep 17 00:00:00 2001
From: amila 
Date: Tue, 2 Apr 2024 00:15:59 +0530
Subject: [PATCH] use move semantics for NodeKinds and update possible callers
 to use it

Signed-off-by: amila 
---
 clang/lib/ASTMatchers/Dynamic/Marshallers.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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 NodeKinds)
-  : CladeNodeKind(CladeNodeKind), NodeKinds(NodeKinds) {}
+  : CladeNodeKind(CladeNodeKind), NodeKinds(std::move(NodeKinds)) {}
 
   VariantMatcher create(SourceRange NameRange, ArrayRef Args,
 Diagnostics *Error) const override {
@@ -1026,7 +1026,7 @@ class MapAnyOfBuilderDescriptor : public 
MatcherDescriptor {
 }
 
 return std::make_unique(CladeNodeKind,
-   NodeKinds);
+   std::move(NodeKinds));
   }
 
   bool isVariadic() const override { return true; }

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-19 Thread Simon Pilgrim via cfe-commits

RKSimon wrote:

@Amila-Rukshan please can you rebase this patch? merge is currently failing

https://github.com/llvm/llvm-project/pull/87273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-19 Thread Simon Pilgrim via cfe-commits

https://github.com/RKSimon approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/87273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-09 Thread Amila Senadheera via cfe-commits

Amila-Rukshan wrote:

Ping

https://github.com/llvm/llvm-project/pull/87273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-01 Thread Amila Senadheera via cfe-commits

Amila-Rukshan wrote:

@firewave, Thank you for pointing it out! I blindly tried to fix it looking at 
the cppcheck output. 

https://github.com/llvm/llvm-project/pull/87273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-01 Thread Amila Senadheera via cfe-commits

https://github.com/Amila-Rukshan edited 
https://github.com/llvm/llvm-project/pull/87273
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits