This is an archive of the discontinued LLVM Phabricator instance.

Fix memory leaks (coverity issues 1365586 & 1365591)
ClosedPublic

Authored by sylvestre.ledru on Nov 7 2016, 12:26 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

sylvestre.ledru retitled this revision from to Fix memory leaks (coverity issues 1365586 & 1365591).
sylvestre.ledru updated this object.
sylvestre.ledru added a reviewer: hfinkel.
sylvestre.ledru set the repository for this revision to rL LLVM.
sylvestre.ledru added a subscriber: llvm-commits.
malcolm.parsons added inline comments.
lib/Support/APFloat.cpp
1685 ↗(On Diff #77017)

Why not use std::unique_ptr?

Thanks for working on this! Just one drive-by nit.

lib/Support/APFloat.cpp
1685 ↗(On Diff #77017)

Piggybacking off of this, it looks like x is always deleted, so would it be correct/beneficial to use a SmallVector<integerPart, N> instead of an array that we always heap-allocate?

This revision was automatically updated to reflect the committed changes.

I will see to implement your propositions later. I wanted to address that quickly