[clang] [NFC][Clang][Analyses] Fix AccessPath to have deleted copy assignment (PR #193639)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 22 17:55:08 PDT 2026
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/193639
Static analysis flagged AccessPath because it had a copy constructor but did not declare a copy assignment. It appears the intent is not to allow assignment, so declare it deleted.
>From b9c77f0cd7b6f2a3b298ac9052e87f64ceb206f6 Mon Sep 17 00:00:00 2001
From: Shafik Yaghmour <shafik.yaghmour at intel.com>
Date: Wed, 22 Apr 2026 17:45:49 -0700
Subject: [PATCH] [NFC][Clang][Analyses] Fix AccessPath to have deleted copy
assignment
Static analysis flagged AccessPath because it had a copy constructor but did not
declare a copy assignment. It appears the intent is not to allow assignment, so
declare it deleted.
---
clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h b/clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h
index aee6bf9eb69c9..c990349b88359 100644
--- a/clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h
+++ b/clang/include/clang/Analysis/Analyses/LifetimeSafety/Loans.h
@@ -68,6 +68,7 @@ class AccessPath {
return AccessPath(Kind::PlaceholderThis, MD);
}
AccessPath(const AccessPath &Other) : K(Other.K), Root(Other.Root) {}
+ AccessPath &operator=(const AccessPath &) = delete;
Kind getKind() const { return K; }
More information about the cfe-commits
mailing list