[PATCH] D62767: [APFloat] APFloat::Storage::Storage - refix use after move
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 20:24:51 PDT 2019
nickdesaulniers created this revision.
nickdesaulniers added reviewers: RKSimon, efriedma.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Re-land r360675 after it was reverted in r360770.
This was reported in:
https://llvm.org/reports/scan-build/
Based on feedback in:
https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190513/652286.html
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62767
Files:
llvm/lib/Support/APFloat.cpp
Index: llvm/lib/Support/APFloat.cpp
===================================================================
--- llvm/lib/Support/APFloat.cpp
+++ llvm/lib/Support/APFloat.cpp
@@ -4418,8 +4418,9 @@
return;
}
if (usesLayout<DoubleAPFloat>(Semantics)) {
+ const fltSemantics& S = F.getSemantics();
new (&Double)
- DoubleAPFloat(Semantics, APFloat(std::move(F), F.getSemantics()),
+ DoubleAPFloat(Semantics, APFloat(std::move(F), S),
APFloat(semIEEEdouble));
return;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62767.202527.patch
Type: text/x-patch
Size: 524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190601/dd20fca1/attachment.bin>
More information about the llvm-commits
mailing list