https://github.com/tchaikov updated
https://github.com/llvm/llvm-project/pull/98100
>From 1a2d88917db32253514fc7a533f5cb39d465a9c7 Mon Sep 17 00:00:00 2001
From: Kefu Chai
Date: Tue, 9 Jul 2024 07:58:23 +0800
Subject: [PATCH] [clang-tidy] let UseAfterMoveFinder::find() return an
optional
befo
@@ -175,6 +218,10 @@ bool UseAfterMoveFinder::findInternal(const CFGBlock
*Block,
MovingCall != nullptr &&
Sequence->potentiallyAfter(MovingCall, Use);
+// We default to false here and change this to true if required in
+// find().
+
https://github.com/tchaikov created
https://github.com/llvm/llvm-project/pull/98100
before this change, we use an output parameter so
`UseAfterMoveFinder::find()` can return the found `UseAfterMove`, and addition
to it, `UseAfterMoveFinder::find()` return a bool, so we can tell if a
use-after-
tchaikov wrote:
thank you Piotr for merging this change.
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tchaikov wrote:
@HerrCai0907 Hello Congcong, thank you for your message. I appreciate your
willingness to help. As I don't have write access to the repository, I would be
grateful if you could review and merge this pull request for me. Please let me
know if you need any additional information
tchaikov wrote:
@5chmidti @PiotrZSL Hi Julian and Piotr, I hope this message finds you well.
I'm following up on my previous comment regarding the PR I submitted two weeks
ago. I understand you both might be busy, but I wanted to check if there's been
any progress or if we are expecting more i
tchaikov wrote:
@5chmidti @PiotrZSL Hi Julian and Piotr, thanks for taking the time to review
my PR. I'm eager to get it merged. Is there anything else I can do to help
facilitate the merge process? Or we can merge it now?
https://github.com/llvm/llvm-project/pull/93623
___
tchaikov wrote:
@PiotrZSL @SimplyDanny and @HerrCai0907 Hello, gentlemen. Would you be
available to take a look at this at your earliest convenience?
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
@@ -110,15 +117,32 @@ bool UseAfterMoveFinder::find(Stmt *CodeBlock, const Expr
*MovingCall,
BlockMap = std::make_unique(TheCFG.get(), Context);
Visited.clear();
- const CFGBlock *Block = BlockMap->blockContainingStmt(MovingCall);
- if (!Block) {
+ const CFGBlock *Move
https://github.com/tchaikov edited
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tchaikov wrote:
@5chmidti hi Julian, thank you for your review, suggestions and approval.
updated accordingly.
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
tchaikov wrote:
v3:
- allocate `CFGReverseBlockReachabilityAnalysis` on stack not on heap, as it's
small enough and can be fit in the stack.
- initialize `EvaluationOrderUndefined` in-class to be more consistent. please
note, before this change, it's always initialized if it's going to be
ref
https://github.com/tchaikov updated
https://github.com/llvm/llvm-project/pull/93623
>From e07681e21f01c56a9e2705f6380838047886598a Mon Sep 17 00:00:00 2001
From: martinboehme
Date: Wed, 29 May 2024 07:23:35 +0800
Subject: [PATCH] [clang-tidy] Let bugprone-use-after-move ignore the moved
variab
https://github.com/tchaikov edited
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tchaikov edited
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tchaikov edited
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -110,15 +117,32 @@ bool UseAfterMoveFinder::find(Stmt *CodeBlock, const Expr
*MovingCall,
BlockMap = std::make_unique(TheCFG.get(), Context);
Visited.clear();
- const CFGBlock *Block = BlockMap->blockContainingStmt(MovingCall);
- if (!Block) {
+ const CFGBlock *Move
@@ -35,6 +37,11 @@ struct UseAfterMove {
// Is the order in which the move and the use are evaluated undefined?
bool EvaluationOrderUndefined;
tchaikov wrote:
sure. but for the reason explained at
https://github.com/llvm/llvm-project/pull/93623#discussio
https://github.com/tchaikov updated
https://github.com/llvm/llvm-project/pull/93623
>From 00df70151da03f9a3d3c6ae3ee8078fd6ff654f0 Mon Sep 17 00:00:00 2001
From: martinboehme
Date: Wed, 29 May 2024 07:23:35 +0800
Subject: [PATCH] [clang-tidy] Let bugprone-use-after-move ignore the moved
variab
https://github.com/tchaikov edited
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tchaikov wrote:
@5chmidti Thanks for your thoughtful review and suggestions!
I've incorporated them into the latest revision, which I'd appreciate you
taking another look at.
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing lis
https://github.com/tchaikov edited
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tchaikov edited
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tchaikov updated
https://github.com/llvm/llvm-project/pull/93623
>From cb1dfa3c776e6c1c327acc6ec7f02c4bceb64069 Mon Sep 17 00:00:00 2001
From: martinboehme
Date: Wed, 29 May 2024 07:23:35 +0800
Subject: [PATCH] [clang-tidy] Let bugprone-use-after-move ignore the moved
variab
@@ -175,6 +218,10 @@ bool UseAfterMoveFinder::findInternal(const CFGBlock
*Block,
MovingCall != nullptr &&
Sequence->potentiallyAfter(MovingCall, Use);
+// We default to false here and change this to true if required in
+// find().
+
tchaikov wrote:
v3:
- trade `reaches()` helper for `CFGReverseBlockReachabilityAnalysis`. less
repeating this way.
- replace `argsContain()` helper with `llvm::is_contained()`. less repeating
this way.
- s/call/Call/. more consistent with the naming convention in LLVM.
- initialize `Evaluation
@@ -69,6 +73,30 @@ class UseAfterMoveFinder {
llvm::SmallPtrSet Visited;
};
+/// Returns whether the `Before` block can reach the `After` block.
+bool reaches(const CFGBlock *Before, const CFGBlock *After) {
+ llvm::SmallVector Stack;
+ llvm::SmallPtrSet Visited;
+
+ Stac
@@ -175,6 +218,10 @@ bool UseAfterMoveFinder::findInternal(const CFGBlock
*Block,
MovingCall != nullptr &&
Sequence->potentiallyAfter(MovingCall, Use);
+// We default to false here and change this to true if required in
+// find().
+
https://github.com/tchaikov updated
https://github.com/llvm/llvm-project/pull/93623
>From 14106f8d990c068f9f75e1ea6a1f10c4be5930f6 Mon Sep 17 00:00:00 2001
From: martinboehme
Date: Wed, 29 May 2024 07:23:35 +0800
Subject: [PATCH] [clang-tidy] Let bugprone-use-after-move ignore the moved
variab
tchaikov wrote:
v2:
- s/auto *Member/const auto *Member/
- merge into the existing ReleaseNote entry of the same check, instead of
creating another one
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llv
https://github.com/tchaikov updated
https://github.com/llvm/llvm-project/pull/93623
>From e9e03e8c07c7b8deaba7ac11a593dfb63b4c9354 Mon Sep 17 00:00:00 2001
From: martinboehme
Date: Wed, 29 May 2024 07:23:35 +0800
Subject: [PATCH] [clang-tidy] Let bugprone-use-after-move ignore the moved
variab
tchaikov wrote:
@martinboehme thank you! from now on, i will try to address the upcoming
comments from reviewers if this PR is fortunate enough to get more attentions,
and to follow it up.
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commi
https://github.com/tchaikov ready_for_review
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tchaikov updated
https://github.com/llvm/llvm-project/pull/93623
>From 3f1ef816ae2bfca3ec253f0aad5b4bb69984d60d Mon Sep 17 00:00:00 2001
From: martinboehme
Date: Wed, 29 May 2024 07:23:35 +0800
Subject: [PATCH] [clang-tidy] Let bugprone-use-after-move ignore the moved
variab
https://github.com/tchaikov edited
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tchaikov updated
https://github.com/llvm/llvm-project/pull/93623
>From 5cbb966128b63212dcf9f2284b9f58fbcd12cee6 Mon Sep 17 00:00:00 2001
From: martinboehme
Date: Wed, 29 May 2024 07:23:35 +0800
Subject: [PATCH 1/2] [clang-tidy] Let bugprone-use-after-move ignore the moved
va
https://github.com/tchaikov updated
https://github.com/llvm/llvm-project/pull/93623
>From 5fc21145abde56096b607cf123f529f97b458252 Mon Sep 17 00:00:00 2001
From: martinboehme
Date: Wed, 29 May 2024 07:23:35 +0800
Subject: [PATCH 1/2] [clang-tidy] Let bugprone-use-after-move ignore the moved
va
tchaikov wrote:
@martinboehme hello Martin, I resurrected your change at
https://reviews.llvm.org/D145581?id=503330#inline-1406063 and posted here in
hope that we can continue your efforts and finally land the change in main
branch. Hope you don't mind that I created this without your permissi
https://github.com/tchaikov updated
https://github.com/llvm/llvm-project/pull/93623
>From 5fc21145abde56096b607cf123f529f97b458252 Mon Sep 17 00:00:00 2001
From: martinboehme
Date: Wed, 29 May 2024 07:23:35 +0800
Subject: [PATCH 1/2] [clang-tidy] Let bugprone-use-after-move ignore the moved
va
https://github.com/tchaikov edited
https://github.com/llvm/llvm-project/pull/93623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tchaikov created
https://github.com/llvm/llvm-project/pull/93623
This eliminates false positives in bugprone-use-after-move where a variable
is used in the callee and moved from in the arguments.
We introduce one special case: If the callee is a MemberExpr with a DeclRefExpr
41 matches
Mail list logo