diff --git a/clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h b/clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h --- a/clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h +++ b/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; diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h @@ -84,6 +84,10 @@ CallEventRef(const T *Call) : IntrusiveRefCntPtr(Call) {} CallEventRef(const CallEventRef &Orig) : IntrusiveRefCntPtr(Orig) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + CallEventRef &operator=(const CallEventRef &) = delete; + CallEventRef cloneWithState(ProgramStateRef State) const { return this->get()->template cloneWithState(State); }