[PATCH] D150931: [NFC][Clang] Fix Static Code Analysis Concerns with copy without assign
Soumi Manna via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 22 12:37:03 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG11528fceac6b: [Clang] Fix Static Code Analysis Concerns with copy without assign (authored by Manna).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150931/new/
https://reviews.llvm.org/D150931
Files:
clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
Index: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
===================================================================
--- clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
+++ clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
@@ -84,6 +84,10 @@
CallEventRef(const T *Call) : IntrusiveRefCntPtr<const T>(Call) {}
CallEventRef(const CallEventRef &Orig) : IntrusiveRefCntPtr<const T>(Orig) {}
+ // The copy assignment operator is defined as deleted pending further
+ // motivation.
+ CallEventRef &operator=(const CallEventRef &) = delete;
+
CallEventRef<T> cloneWithState(ProgramStateRef State) const {
return this->get()->template cloneWithState<T>(State);
}
Index: clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
===================================================================
--- clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
+++ clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h
@@ -319,6 +319,7 @@
protected:
SExpr(TIL_Opcode Op) : Opcode(Op) {}
SExpr(const SExpr &E) : Opcode(E.Opcode), Flags(E.Flags) {}
+ SExpr &operator=(const SExpr &) = delete;
const TIL_Opcode Opcode;
unsigned char Reserved = 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150931.533733.patch
Type: text/x-patch
Size: 1227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230622/98ea86b7/attachment.bin>
More information about the cfe-commits
mailing list