Skip to content

NFC: Fix -Wdeprecated-copy warnings #29013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/swift/Reflection/Records.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ struct AssociatedTypeRecordIterator {
return *this;
}

AssociatedTypeRecordIterator(const AssociatedTypeRecordIterator &Other)
: Cur(Other.Cur), End(Other.End) {}
AssociatedTypeRecordIterator
operator=(const AssociatedTypeRecordIterator &Other) {
return { Other.Cur, Other.End };
Expand Down
4 changes: 4 additions & 0 deletions lib/IDE/Formatting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,10 @@ class FormatWalker : public SourceEntityWalker {
public:
SourceLocIterator(TokenIt It) :It(It) {}
SourceLocIterator(const SourceLocIterator& mit) : It(mit.It) {}
const SourceLocIterator &operator=(const SourceLocIterator &mit) {
It = mit.It;
return *this;
}
SourceLocIterator& operator++() {++It; return *this;}
SourceLocIterator operator++(int) {
SourceLocIterator tmp(*this);
Expand Down
2 changes: 2 additions & 0 deletions lib/SILOptimizer/IPO/CapturePromotion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ class ReachingBlockSet {
return !(*this == RHS);
}

ReachingBlockSet(const ReachingBlockSet &RHS)
: Bits(RHS.Bits), NumBitWords(RHS.NumBitWords) {}
const ReachingBlockSet &operator=(const ReachingBlockSet &RHS) {
assert(NumBitWords == RHS.NumBitWords && "mismatched sets");
for (size_t i = 0, e = NumBitWords; i != e; ++i)
Expand Down
3 changes: 2 additions & 1 deletion lib/Sema/InstrumenterSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ template <class E> class Added {

public:
Added() {}
Added(E NewContents) { Contents = NewContents; }
Added(E NewContents) : Contents(NewContents) {}
Added(const Added<E> &rhs) : Contents(rhs.Contents) {}
const Added<E> &operator=(const Added<E> &rhs) {
Contents = rhs.Contents;
return *this;
Expand Down