Revert 'Fixed -Wdeprecated-copy warnings. NFCI.'
authorDávid Bolvanský <david.bolvansky@gmail.com>
Sat, 23 Nov 2019 20:31:17 +0000 (21:31 +0100)
committerDávid Bolvanský <david.bolvansky@gmail.com>
Sat, 23 Nov 2019 20:31:27 +0000 (21:31 +0100)
 pdbutil's test is failing.

clang/include/clang/AST/ASTImporter.h
clang/include/clang/Sema/ObjCMethodList.h
llvm/include/llvm/ADT/STLExtras.h
llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h
llvm/include/llvm/DebugInfo/PDB/Native/HashTable.h
llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h
llvm/include/llvm/Support/BinaryStreamArray.h
llvm/include/llvm/Support/Timer.h
llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp
llvm/lib/Target/Hexagon/HexagonGenInsert.cpp
llvm/utils/TableGen/CodeGenDAGPatterns.h

index 490b34bf95e82146a2cec226ba3b0365d462951d..c82dcab35db578419faaa803c7f2725202c45178 100644 (file)
@@ -60,12 +60,8 @@ class TypeSourceInfo;
 
     static char ID;
 
-    ImportError() : Error(Unknown) {}
-    ImportError(const ImportError &Other) : Error(Other.Error) {}
-    ImportError &operator=(const ImportError &Other) {
-      Error = Other.Error;
-      return *this;
-    }
+    ImportError() : Error(Unknown) { }
+    ImportError(const ImportError &Other) : Error(Other.Error) { }
     ImportError(ErrorKind Error) : Error(Error) { }
 
     std::string toString() const;
index 9e65e0d8e00af1eca3adf25fa3b992fe5bef5af7..bd2ce2a9f016658c4d7f14da8899775b4ff2210d 100644 (file)
@@ -36,12 +36,6 @@ struct ObjCMethodList {
       : MethodAndHasMoreThanOneDecl(L.MethodAndHasMoreThanOneDecl),
         NextAndExtraBits(L.NextAndExtraBits) {}
 
-  ObjCMethodList &operator=(const ObjCMethodList &L) {
-    MethodAndHasMoreThanOneDecl = L.MethodAndHasMoreThanOneDecl;
-    NextAndExtraBits = L.NextAndExtraBits;
-    return *this;
-  }
-
   ObjCMethodList *getNext() const { return NextAndExtraBits.getPointer(); }
   unsigned getBits() const { return NextAndExtraBits.getInt(); }
   void setNext(ObjCMethodList *L) { NextAndExtraBits.setPointer(L); }
index b61dab2459d18e696314a729a69a75fec5882cf1..f0fe4fd94380cacda0826f52a73171623f8a91d4 100644 (file)
@@ -1415,8 +1415,6 @@ template <typename R> struct result_pair {
   result_pair(std::size_t Index, IterOfRange<R> Iter)
       : Index(Index), Iter(Iter) {}
 
-  result_pair<R>(const result_pair<R> &Other)
-      : Index(Other.Index), Iter(Other.Iter) {}
   result_pair<R> &operator=(const result_pair<R> &Other) {
     Index = Other.Index;
     Iter = Other.Iter;
@@ -1465,7 +1463,6 @@ public:
     return Result.Iter == RHS.Result.Iter;
   }
 
-  enumerator_iter<R>(const enumerator_iter<R> &Other) : Result(Other.Result) {}
   enumerator_iter<R> &operator=(const enumerator_iter<R> &Other) {
     Result = Other.Result;
     return *this;
index 5fb13ad30e91b9adb3aa2ad20614045315142cdd..14223273c898c0464a4cc9e395c79c6e47c70299 100644 (file)
@@ -39,7 +39,6 @@ public:
   DbiModuleSourceFilesIterator(const DbiModuleList &Modules, uint32_t Modi,
                                uint16_t Filei);
   DbiModuleSourceFilesIterator() = default;
-  DbiModuleSourceFilesIterator(const DbiModuleSourceFilesIterator &R) = default;
   DbiModuleSourceFilesIterator &
   operator=(const DbiModuleSourceFilesIterator &R) = default;
 
index 01bb7aff44b0e1c85c380476d103f039534ebffb..aa38417bcf4c10dcb6a7fb861d8f5afab617b6b0 100644 (file)
@@ -56,7 +56,6 @@ public:
     }
   }
 
-  HashTableIterator(const HashTableIterator &R) : Map(R.Map) {}
   HashTableIterator &operator=(const HashTableIterator &R) {
     Map = R.Map;
     return *this;
index e64ab9cdc6f53fd3123fc12fcb852d91b80e9c13..849dbd57f1aa2b8e8699ac48d8d94549342d70fc 100644 (file)
@@ -174,7 +174,6 @@ struct DiagnosticPredicate {
                    : DiagnosticPredicateTy::NearMatch) {}
   DiagnosticPredicate(DiagnosticPredicateTy T) : Type(T) {}
   DiagnosticPredicate(const DiagnosticPredicate &) = default;
-  DiagnosticPredicate& operator=(const DiagnosticPredicate &) = default;
 
   operator bool() const { return Type == DiagnosticPredicateTy::Match; }
   bool isMatch() const { return Type == DiagnosticPredicateTy::Match; }
index 1634983d26ce0695e86b4b46f9e4f19842da9723..e490389c8ec431035c07ec9b0eaf3eb2258df3c1 100644 (file)
@@ -274,7 +274,6 @@ public:
     return !(*this == Other);
   }
 
-  FixedStreamArray(const FixedStreamArray &) = default;
   FixedStreamArray &operator=(const FixedStreamArray &) = default;
 
   const T &operator[](uint32_t Index) const {
@@ -324,8 +323,6 @@ public:
   FixedStreamArrayIterator(const FixedStreamArray<T> &Array, uint32_t Index)
       : Array(Array), Index(Index) {}
 
-  FixedStreamArrayIterator<T>(const FixedStreamArrayIterator<T> &Other)
-      : Array(Other.Array), Index(Other.Index) {}
   FixedStreamArrayIterator<T> &
   operator=(const FixedStreamArrayIterator<T> &Other) {
     Array = Other.Array;
index a298ecd9040463adad1defbbf20fb0e83321ec35..06a2f9e6dc9d73bf1491cecc0e5dd95bd91ea36c 100644 (file)
@@ -174,7 +174,6 @@ class TimerGroup {
     std::string Description;
 
     PrintRecord(const PrintRecord &Other) = default;
-    PrintRecord &operator=(const PrintRecord &Other) = default;
     PrintRecord(const TimeRecord &Time, const std::string &Name,
                 const std::string &Description)
       : Time(Time), Name(Name), Description(Description) {}
index 5b61d1084e08ae213fc7d5ab1b70196c5198abdc..3f759cdd57c0483fe14e17baf93209e95bea47cc 100644 (file)
@@ -134,21 +134,11 @@ namespace {
     uint32_t properties() const;
     unsigned size() const { return Size; }
 
-    LatticeCell(const LatticeCell &L) {
-      // This memcpy also copies Properties (when L.Size == 0).
-      uint32_t N =
-          L.IsSpecial ? sizeof L.Properties : L.Size * sizeof(const Constant *);
-      memcpy(Values, L.Values, N);
-      Kind = L.Kind;
-      Size = L.Size;
-      IsSpecial = L.IsSpecial;
-    }
-
-    LatticeCell &operator=(const LatticeCell &L) {
+    LatticeCell &operator= (const LatticeCell &L) {
       if (this != &L) {
         // This memcpy also copies Properties (when L.Size == 0).
         uint32_t N = L.IsSpecial ? sizeof L.Properties
-                                 : L.Size * sizeof(const Constant *);
+                                 : L.Size*sizeof(const Constant*);
         memcpy(Values, L.Values, N);
         Kind = L.Kind;
         Size = L.Size;
index 2f29e88bc989be76b142a2be00cad56a541621e7..5a1d04c57975fe897ed1e2a728820cbfbc76e3b3 100644 (file)
@@ -93,10 +93,6 @@ namespace {
     RegisterSet() = default;
     explicit RegisterSet(unsigned s, bool t = false) : BitVector(s, t) {}
     RegisterSet(const RegisterSet &RS) : BitVector(RS) {}
-    RegisterSet &operator=(const RegisterSet &RS) {
-      BitVector::operator=(RS);
-      return *this;
-    }
 
     using BitVector::clear;
 
index 6732db5dfb6d6d36653a15aaac882bcc977bf2fd..80fc932a7a50250f9c453c277dd807d82d246fb2 100644 (file)
@@ -194,7 +194,6 @@ struct TypeSetByHwMode : public InfoByHwMode<MachineValueTypeSet> {
 
   TypeSetByHwMode() = default;
   TypeSetByHwMode(const TypeSetByHwMode &VTS) = default;
-  TypeSetByHwMode &operator=(const TypeSetByHwMode &) = default;
   TypeSetByHwMode(MVT::SimpleValueType VT)
     : TypeSetByHwMode(ValueTypeByHwMode(VT)) {}
   TypeSetByHwMode(ValueTypeByHwMode VT)