Index: clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h =================================================================== --- clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h +++ clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h @@ -320,6 +320,10 @@ SExpr(TIL_Opcode Op) : Opcode(Op) {} SExpr(const SExpr &E) : Opcode(E.Opcode), Flags(E.Flags) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + SExpr &operator=(const SExpr &) = delete; + const TIL_Opcode Opcode; unsigned char Reserved = 0; unsigned short Flags = 0; @@ -380,6 +384,10 @@ Flags = Vd.kind(); } + // The copy assignment operator is defined as deleted pending further + // motivation. + Variable &operator=(const Variable &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Variable; } /// Return the kind of variable (let, function param, or self) @@ -681,6 +689,10 @@ Vd->setKind(Variable::VK_Fun); } + // The copy assignment operator is defined as deleted pending further + // motivation. + Function &operator=(const Function &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Function; } Variable *variableDecl() { return VarDecl; } @@ -736,6 +748,10 @@ Vd->Definition = this; } + // The copy assignment operator is defined as deleted pending further + // motivation. + SFunction &operator=(const SFunction &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_SFunction; } Variable *variableDecl() { return VarDecl; } @@ -776,6 +792,10 @@ Code(const Code &C, SExpr *T, SExpr *B) // rewrite constructor : SExpr(C), ReturnType(T), Body(B) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + Code &operator=(const Code &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Code; } SExpr *returnType() { return ReturnType; } @@ -811,6 +831,10 @@ Field(const Field &C, SExpr *R, SExpr *B) // rewrite constructor : SExpr(C), Range(R), Body(B) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + Field &operator=(const Field &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Field; } SExpr *range() { return Range; } @@ -850,6 +874,10 @@ Apply(const Apply &A, SExpr *F, SExpr *Ar) // rewrite constructor : SExpr(A), Fun(F), Arg(Ar) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + Apply &operator=(const Apply &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Apply; } SExpr *fun() { return Fun; } @@ -885,6 +913,10 @@ SApply(SApply &A, SExpr *Sf, SExpr *Ar = nullptr) // rewrite constructor : SExpr(A), Sfun(Sf), Arg(Ar) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + SApply &operator=(const SApply &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_SApply; } SExpr *sfun() { return Sfun; } @@ -976,6 +1008,10 @@ : SExpr(COP_Call), Target(T), Cexpr(Ce) {} Call(const Call &C, SExpr *T) : SExpr(C), Target(T), Cexpr(C.Cexpr) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + Call &operator=(const Call &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Call; } SExpr *target() { return Target; } @@ -1010,6 +1046,10 @@ Alloc(SExpr *D, AllocKind K) : SExpr(COP_Alloc), Dtype(D) { Flags = K; } Alloc(const Alloc &A, SExpr *Dt) : SExpr(A), Dtype(Dt) { Flags = A.kind(); } + // The copy assignment operator is defined as deleted pending further + // motivation. + Alloc &operator=(const Alloc &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Call; } AllocKind kind() const { return static_cast(Flags); } @@ -1041,6 +1081,10 @@ Load(SExpr *P) : SExpr(COP_Load), Ptr(P) {} Load(const Load &L, SExpr *P) : SExpr(L), Ptr(P) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + Load &operator=(const Load &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Load; } SExpr *pointer() { return Ptr; } @@ -1068,6 +1112,10 @@ Store(SExpr *P, SExpr *V) : SExpr(COP_Store), Dest(P), Source(V) {} Store(const Store &S, SExpr *P, SExpr *V) : SExpr(S), Dest(P), Source(V) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + Store &operator=(const Store &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Store; } SExpr *destination() { return Dest; } // Address to store to @@ -1104,6 +1152,10 @@ ArrayIndex(const ArrayIndex &E, SExpr *A, SExpr *N) : SExpr(E), Array(A), Index(N) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + ArrayIndex &operator=(const ArrayIndex &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_ArrayIndex; } SExpr *array() { return Array; } @@ -1141,6 +1193,10 @@ ArrayAdd(const ArrayAdd &E, SExpr *A, SExpr *N) : SExpr(E), Array(A), Index(N) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + ArrayAdd &operator=(const ArrayAdd &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_ArrayAdd; } SExpr *array() { return Array; } @@ -1179,6 +1235,10 @@ UnaryOp(const UnaryOp &U, SExpr *E) : SExpr(U), Expr0(E) { Flags = U.Flags; } + // The copy assignment operator is defined as deleted pending further + // motivation. + UnaryOp &operator=(const UnaryOp &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_UnaryOp; } TIL_UnaryOpcode unaryOpcode() const { @@ -1221,6 +1281,10 @@ Flags = B.Flags; } + // The copy assignment operator is defined as deleted pending further + // motivation. + BinaryOp &operator=(const BinaryOp &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_BinaryOp; } TIL_BinaryOpcode binaryOpcode() const { @@ -1265,6 +1329,10 @@ Cast(TIL_CastOpcode Op, SExpr *E) : SExpr(COP_Cast), Expr0(E) { Flags = Op; } Cast(const Cast &C, SExpr *E) : SExpr(C), Expr0(E) { Flags = C.Flags; } + // The copy assignment operator is defined as deleted pending further + // motivation. + Cast &operator=(const Cast &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Cast; } TIL_CastOpcode castOpcode() const { @@ -1315,6 +1383,10 @@ Phi(MemRegionRef A, unsigned Nvals) : SExpr(COP_Phi), Values(A, Nvals) {} Phi(const Phi &P, ValArray &&Vs) : SExpr(P), Values(std::move(Vs)) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + Phi &operator=(const Phi &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Phi; } const ValArray &values() const { return Values; } @@ -1381,6 +1453,10 @@ Goto(const Goto &G, BasicBlock *B, unsigned I) : Terminator(COP_Goto), TargetBlock(B), Index(I) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + Goto &operator=(const Goto &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Goto; } const BasicBlock *targetBlock() const { return TargetBlock; } @@ -1426,6 +1502,10 @@ Branches[1] = E; } + // The copy assignment operator is defined as deleted pending further + // motivation. + Branch &operator=(const Branch &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Branch; } const SExpr *condition() const { return Condition; } @@ -1466,6 +1546,10 @@ Return(SExpr* Rval) : Terminator(COP_Return), Retval(Rval) {} Return(const Return &R, SExpr* Rval) : Terminator(R), Retval(Rval) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + Return &operator=(const Return &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Return; } /// Return an empty list. @@ -1542,6 +1626,10 @@ : SExpr(COP_BasicBlock), Arena(A), BlockID(0), Visited(false), Args(std::move(As)), Instrs(std::move(Is)), TermInstr(T) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + BasicBlock &operator=(const BasicBlock &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_BasicBlock; } /// Returns the block ID. Every block has a unique ID in the CFG. @@ -1713,6 +1801,10 @@ // TODO: set entry and exit! } + // The copy assignment operator is defined as deleted pending further + // motivation. + SCFG &operator=(const SCFG &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_SCFG; } /// Return true if this CFG is valid. @@ -1822,6 +1914,10 @@ IfThenElse(const IfThenElse &I, SExpr *C, SExpr *T, SExpr *E) : SExpr(I), Condition(C), ThenExpr(T), ElseExpr(E) {} + // The copy assignment operator is defined as deleted pending further + // motivation. + IfThenElse &operator=(const IfThenElse &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_IfThenElse; } SExpr *condition() { return Condition; } // Address to store to @@ -1870,6 +1966,10 @@ Vd->setKind(Variable::VK_Let); } + // The copy assignment operator is defined as deleted pending further + // motivation. + Let &operator=(const Let &) = delete; + static bool classof(const SExpr *E) { return E->opcode() == COP_Let; } Variable *variableDecl() { return VarDecl; } 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(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); }