-Wdeprecated: Job objects are stored in a vector yet are not really copyable, make them movable instead

llvm-svn: 244829
This commit is contained in:
David Blaikie 2015-08-12 23:09:24 +00:00
parent bad690e8f7
commit 737260662b
1 changed files with 8 additions and 2 deletions

View File

@ -6555,7 +6555,13 @@ class DataRecursiveIntBinOpEvaluator {
EvalResult LHSResult; // meaningful only for binary operator expression.
enum { AnyExprKind, BinOpKind, BinOpVisitedLHSKind } Kind;
Job() : StoredInfo(nullptr) {}
Job() = default;
Job(Job &&J)
: E(J.E), LHSResult(J.LHSResult), Kind(J.Kind),
StoredInfo(J.StoredInfo), OldEvalStatus(J.OldEvalStatus) {
J.StoredInfo = nullptr;
}
void startSpeculativeEval(EvalInfo &Info) {
OldEvalStatus = Info.EvalStatus;
Info.EvalStatus.Diag = nullptr;
@ -6567,7 +6573,7 @@ class DataRecursiveIntBinOpEvaluator {
}
}
private:
EvalInfo *StoredInfo; // non-null if status changed.
EvalInfo *StoredInfo = nullptr; // non-null if status changed.
Expr::EvalStatus OldEvalStatus;
};