summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-08-17 06:33:46 +0000
committerDaniel Jasper <djasper@google.com>2017-08-17 06:33:46 +0000
commita7e061f07b258bc0fb25d373c21dc8c8d0b478a5 (patch)
tree558ae9932ca21bdb8f53b0f0c9ac621e4012887d
parentcaff3268a1bbfdad661028a2c959faf19235167c (diff)
downloadbcm5719-llvm-a7e061f07b258bc0fb25d373c21dc8c8d0b478a5.tar.gz
bcm5719-llvm-a7e061f07b258bc0fb25d373c21dc8c8d0b478a5.zip
Fix undefined behavior that is caused by not always initializing a bool.
The fix in r310994 is incomplete, as moveFromAndCancel can set the pointer without initializing OldIsSpeculativelyEvaluating. llvm-svn: 311070
-rw-r--r--clang/lib/AST/ExprConstant.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 32cb42ea4e0..041bede6bdc 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -984,6 +984,7 @@ namespace {
void moveFromAndCancel(SpeculativeEvaluationRAII &&Other) {
Info = Other.Info;
OldStatus = Other.OldStatus;
+ OldIsSpeculativelyEvaluating = Other.OldIsSpeculativelyEvaluating;
Other.Info = nullptr;
}
OpenPOWER on IntegriCloud