Index: clang/include/clang/AST/ASTContext.h =================================================================== --- clang/include/clang/AST/ASTContext.h +++ clang/include/clang/AST/ASTContext.h @@ -3210,7 +3210,6 @@ public: ObjCEncOptions() : Bits(0) {} - ObjCEncOptions(const ObjCEncOptions &RHS) : Bits(RHS.Bits) {} #define OPT_LIST(V) \ V(ExpandPointedToStructures, 0) \ Index: clang/include/clang/Analysis/Analyses/Consumed.h =================================================================== --- clang/include/clang/Analysis/Analyses/Consumed.h +++ clang/include/clang/Analysis/Analyses/Consumed.h @@ -155,6 +155,8 @@ ConsumedStateMap(const ConsumedStateMap &Other) : Reachable(Other.Reachable), From(Other.From), VarMap(Other.VarMap) {} + ConsumedStateMap &operator=(const ConsumedStateMap &) = delete; + /// Warn if any of the parameters being tracked are not in the state /// they were declared to be in upon return from a function. void checkParamsForReturnTypestate(SourceLocation BlameLoc, Index: clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h =================================================================== --- clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h +++ clang/include/clang/Analysis/Analyses/ThreadSafetyTIL.h @@ -565,6 +565,7 @@ public: LiteralT(T Dat) : Literal(ValueType::getValueType()), Val(Dat) {} LiteralT(const LiteralT &L) : Literal(L), Val(L.Val) {} + LiteralT &operator=(const LiteralT &) = delete; T value() const { return Val;} T& value() { return Val; } Index: clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h =================================================================== --- clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h +++ clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h @@ -240,6 +240,7 @@ VectorData() = default; VectorData(const VectorData &VD) : Vect(VD.Vect) {} + VectorData &operator=(const VectorData &) = delete; }; public: Index: clang/include/clang/Rewrite/Core/RewriteRope.h =================================================================== --- clang/include/clang/Rewrite/Core/RewriteRope.h +++ clang/include/clang/Rewrite/Core/RewriteRope.h @@ -181,6 +181,8 @@ RewriteRope() = default; RewriteRope(const RewriteRope &RHS) : Chunks(RHS.Chunks) {} + RewriteRope &operator=(const RewriteRope &) = delete; + using iterator = RopePieceBTree::iterator; using const_iterator = RopePieceBTree::iterator; Index: clang/include/clang/Sema/Sema.h =================================================================== --- clang/include/clang/Sema/Sema.h +++ clang/include/clang/Sema/Sema.h @@ -1787,6 +1787,7 @@ const FunctionDecl *Fn, Sema &S); SemaDiagnosticBuilder(SemaDiagnosticBuilder &&D); SemaDiagnosticBuilder(const SemaDiagnosticBuilder &) = default; + SemaDiagnosticBuilder &operator=(const SemaDiagnosticBuilder &) = delete; ~SemaDiagnosticBuilder(); bool isImmediate() const { return ImmediateDiag.has_value(); } Index: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h =================================================================== --- clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h +++ clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h @@ -51,6 +51,7 @@ BugReporterVisitor() = default; BugReporterVisitor(const BugReporterVisitor &) = default; BugReporterVisitor(BugReporterVisitor &&) {} + BugReporterVisitor &operator=(const BugReporterVisitor &) = delete; virtual ~BugReporterVisitor(); /// Return a diagnostic piece which should be associated with the Index: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h =================================================================== --- clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h +++ clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h @@ -670,7 +670,9 @@ public: SymbolVisitor() = default; SymbolVisitor(const SymbolVisitor &) = default; + SymbolVisitor &operator=(const SymbolVisitor &) = delete; SymbolVisitor(SymbolVisitor &&) {} + SymbolVisitor &operator=(SymbolVisitor &&) = delete; /// A visitor method invoked by ProgramStateManager::scanReachableSymbols. /// Index: clang/lib/CodeGen/CGDebugInfo.h =================================================================== --- clang/lib/CodeGen/CGDebugInfo.h +++ clang/lib/CodeGen/CGDebugInfo.h @@ -829,7 +829,12 @@ ApplyDebugLocation(ApplyDebugLocation &&Other) : CGF(Other.CGF) { Other.CGF = nullptr; } - ApplyDebugLocation &operator=(ApplyDebugLocation &&) = default; + + ApplyDebugLocation &operator=(ApplyDebugLocation &&Other) { + CGF = Other.CGF; + Other.CGF = nullptr; + return *this; + } ~ApplyDebugLocation(); Index: clang/lib/CodeGen/EHScopeStack.h =================================================================== --- clang/lib/CodeGen/EHScopeStack.h +++ clang/lib/CodeGen/EHScopeStack.h @@ -148,6 +148,7 @@ public: Cleanup(const Cleanup &) = default; Cleanup(Cleanup &&) {} + Cleanup &operator=(const Cleanup &) = delete; Cleanup() = default; virtual bool isRedundantBeforeReturn() { return false; }