diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-14 14:13:30 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-14 14:13:30 +0000 |
commit | 9fd3be294c9bb227000511655a04b489574b138c (patch) | |
tree | 18680034a1c385f0c90811558969d758b0cf6d3a /llvm/lib/Support/APFloat.cpp | |
parent | 7a9ccf89f238dea27c79998808740e47c4ee0f75 (diff) | |
download | bcm5719-llvm-9fd3be294c9bb227000511655a04b489574b138c.tar.gz bcm5719-llvm-9fd3be294c9bb227000511655a04b489574b138c.zip |
[APFloat] APFloat::Storage::Storage - fix use after move
This was mentioned both in https://www.viva64.com/en/b/0629/ and by scan-build checks
llvm-svn: 360675
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r-- | llvm/lib/Support/APFloat.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp index 208950d7ab7..aea59301079 100644 --- a/llvm/lib/Support/APFloat.cpp +++ b/llvm/lib/Support/APFloat.cpp @@ -4418,9 +4418,9 @@ APFloat::Storage::Storage(IEEEFloat F, const fltSemantics &Semantics) { return; } if (usesLayout<DoubleAPFloat>(Semantics)) { - new (&Double) - DoubleAPFloat(Semantics, APFloat(std::move(F), F.getSemantics()), - APFloat(semIEEEdouble)); + const fltSemantics IEEESemantics = F.getSemantics(); + new (&Double) DoubleAPFloat(Semantics, APFloat(std::move(F), IEEESemantics), + APFloat(semIEEEdouble)); return; } llvm_unreachable("Unexpected semantics"); |