diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-08-12 23:09:24 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-08-12 23:09:24 +0000 |
commit | 737260662b3b3d0ae81070f6ad59527069c0ff6e (patch) | |
tree | b370722c0e5eee65f1e4962c7950abd898310ad5 /clang/lib/AST/ExprConstant.cpp | |
parent | bad690e8f7f07da2c94e2e5878511fedaf87f68e (diff) | |
download | bcm5719-llvm-737260662b3b3d0ae81070f6ad59527069c0ff6e.tar.gz bcm5719-llvm-737260662b3b3d0ae81070f6ad59527069c0ff6e.zip |
-Wdeprecated: Job objects are stored in a vector yet are not really copyable, make them movable instead
llvm-svn: 244829
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index ed749cc56f1..275d89ae7a8 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -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; }; |