From: Dávid Bolvanský Date: Sat, 23 Nov 2019 20:31:17 +0000 (+0100) Subject: Revert 'Fixed -Wdeprecated-copy warnings. NFCI.' X-Git-Tag: llvmorg-11-init~3536 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=111a4cffa0a905c260fed99d0d52308906863a65;p=platform%2Fupstream%2Fllvm.git Revert 'Fixed -Wdeprecated-copy warnings. NFCI.' pdbutil's test is failing. --- diff --git a/clang/include/clang/AST/ASTImporter.h b/clang/include/clang/AST/ASTImporter.h index 490b34bf95e8..c82dcab35db5 100644 --- a/clang/include/clang/AST/ASTImporter.h +++ b/clang/include/clang/AST/ASTImporter.h @@ -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; diff --git a/clang/include/clang/Sema/ObjCMethodList.h b/clang/include/clang/Sema/ObjCMethodList.h index 9e65e0d8e00a..bd2ce2a9f016 100644 --- a/clang/include/clang/Sema/ObjCMethodList.h +++ b/clang/include/clang/Sema/ObjCMethodList.h @@ -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); } diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h index b61dab2459d1..f0fe4fd94380 100644 --- a/llvm/include/llvm/ADT/STLExtras.h +++ b/llvm/include/llvm/ADT/STLExtras.h @@ -1415,8 +1415,6 @@ template struct result_pair { result_pair(std::size_t Index, IterOfRange Iter) : Index(Index), Iter(Iter) {} - result_pair(const result_pair &Other) - : Index(Other.Index), Iter(Other.Iter) {} result_pair &operator=(const result_pair &Other) { Index = Other.Index; Iter = Other.Iter; @@ -1465,7 +1463,6 @@ public: return Result.Iter == RHS.Result.Iter; } - enumerator_iter(const enumerator_iter &Other) : Result(Other.Result) {} enumerator_iter &operator=(const enumerator_iter &Other) { Result = Other.Result; return *this; diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h b/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h index 5fb13ad30e91..14223273c898 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleList.h @@ -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; diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/HashTable.h b/llvm/include/llvm/DebugInfo/PDB/Native/HashTable.h index 01bb7aff44b0..aa38417bcf4c 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/HashTable.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/HashTable.h @@ -56,7 +56,6 @@ public: } } - HashTableIterator(const HashTableIterator &R) : Map(R.Map) {} HashTableIterator &operator=(const HashTableIterator &R) { Map = R.Map; return *this; diff --git a/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h b/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h index e64ab9cdc6f5..849dbd57f1aa 100644 --- a/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h +++ b/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h @@ -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; } diff --git a/llvm/include/llvm/Support/BinaryStreamArray.h b/llvm/include/llvm/Support/BinaryStreamArray.h index 1634983d26ce..e490389c8ec4 100644 --- a/llvm/include/llvm/Support/BinaryStreamArray.h +++ b/llvm/include/llvm/Support/BinaryStreamArray.h @@ -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 &Array, uint32_t Index) : Array(Array), Index(Index) {} - FixedStreamArrayIterator(const FixedStreamArrayIterator &Other) - : Array(Other.Array), Index(Other.Index) {} FixedStreamArrayIterator & operator=(const FixedStreamArrayIterator &Other) { Array = Other.Array; diff --git a/llvm/include/llvm/Support/Timer.h b/llvm/include/llvm/Support/Timer.h index a298ecd90404..06a2f9e6dc9d 100644 --- a/llvm/include/llvm/Support/Timer.h +++ b/llvm/include/llvm/Support/Timer.h @@ -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) {} diff --git a/llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp b/llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp index 5b61d1084e08..3f759cdd57c0 100644 --- a/llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp +++ b/llvm/lib/Target/Hexagon/HexagonConstPropagation.cpp @@ -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; diff --git a/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp b/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp index 2f29e88bc989..5a1d04c57975 100644 --- a/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp +++ b/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp @@ -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; diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h index 6732db5dfb6d..80fc932a7a50 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.h +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.h @@ -194,7 +194,6 @@ struct TypeSetByHwMode : public InfoByHwMode { TypeSetByHwMode() = default; TypeSetByHwMode(const TypeSetByHwMode &VTS) = default; - TypeSetByHwMode &operator=(const TypeSetByHwMode &) = default; TypeSetByHwMode(MVT::SimpleValueType VT) : TypeSetByHwMode(ValueTypeByHwMode(VT)) {} TypeSetByHwMode(ValueTypeByHwMode VT)