r244829 - -Wdeprecated: Job objects are stored in a vector yet are not really copyable, make them movable instead
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 12 16:09:24 PDT 2015
Author: dblaikie
Date: Wed Aug 12 18:09:24 2015
New Revision: 244829
URL: http://llvm.org/viewvc/llvm-project?rev=244829&view=rev
Log:
-Wdeprecated: Job objects are stored in a vector yet are not really copyable, make them movable instead
Modified:
cfe/trunk/lib/AST/ExprConstant.cpp
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=244829&r1=244828&r2=244829&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Wed Aug 12 18:09:24 2015
@@ -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;
};
More information about the cfe-commits
mailing list