[PATCH] D150931: [NFC][Clang][Coverity] Fix Static Code Analysis Concerns with copy without assign
Soumi Manna via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 19 16:06:23 PDT 2023
Manna updated this revision to Diff 523957.
Manna added a comment.
I have addressed review comments.
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.523957.patch
Type: text/x-patch
Size: 1226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230519/f1a0f180/attachment.bin>
More information about the cfe-commits
mailing list