Skip to content

Commit 89c5c0e

Browse files
authored
Merge pull request #29013 from davezarzycki/pr29013
NFC: Fix -Wdeprecated-copy warnings
2 parents 9a2b29b + 3d1739f commit 89c5c0e

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

include/swift/Reflection/Records.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ struct AssociatedTypeRecordIterator {
266266
return *this;
267267
}
268268

269+
AssociatedTypeRecordIterator(const AssociatedTypeRecordIterator &Other)
270+
: Cur(Other.Cur), End(Other.End) {}
269271
AssociatedTypeRecordIterator
270272
operator=(const AssociatedTypeRecordIterator &Other) {
271273
return { Other.Cur, Other.End };

lib/IDE/Formatting.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,10 @@ class FormatWalker : public SourceEntityWalker {
564564
public:
565565
SourceLocIterator(TokenIt It) :It(It) {}
566566
SourceLocIterator(const SourceLocIterator& mit) : It(mit.It) {}
567+
const SourceLocIterator &operator=(const SourceLocIterator &mit) {
568+
It = mit.It;
569+
return *this;
570+
}
567571
SourceLocIterator& operator++() {++It; return *this;}
568572
SourceLocIterator operator++(int) {
569573
SourceLocIterator tmp(*this);

lib/SILOptimizer/IPO/CapturePromotion.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ class ReachingBlockSet {
160160
return !(*this == RHS);
161161
}
162162

163+
ReachingBlockSet(const ReachingBlockSet &RHS)
164+
: Bits(RHS.Bits), NumBitWords(RHS.NumBitWords) {}
163165
const ReachingBlockSet &operator=(const ReachingBlockSet &RHS) {
164166
assert(NumBitWords == RHS.NumBitWords && "mismatched sets");
165167
for (size_t i = 0, e = NumBitWords; i != e; ++i)

lib/Sema/InstrumenterSupport.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ template <class E> class Added {
2828

2929
public:
3030
Added() {}
31-
Added(E NewContents) { Contents = NewContents; }
31+
Added(E NewContents) : Contents(NewContents) {}
32+
Added(const Added<E> &rhs) : Contents(rhs.Contents) {}
3233
const Added<E> &operator=(const Added<E> &rhs) {
3334
Contents = rhs.Contents;
3435
return *this;

0 commit comments

Comments
 (0)