diff options
| author | Eric Fiselier <eric@efcs.ca> | 2014-11-21 01:53:51 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2014-11-21 01:53:51 +0000 |
| commit | a315865759bc926a0e2b64ad237e8518c1a855f4 (patch) | |
| tree | 8d594b45b05654892b4cecfeb6b86891f7aadff1 /libcxxabi/test/inherited_exception.cpp | |
| parent | 9ce6beaf071b565f9ce46ed810f4c86fcf000cf1 (diff) | |
| download | bcm5719-llvm-a315865759bc926a0e2b64ad237e8518c1a855f4.tar.gz bcm5719-llvm-a315865759bc926a0e2b64ad237e8518c1a855f4.zip | |
[libcxxabi] Cleanup memory in tests to placate ASAN.
Summary: ASAN fires on these tests because they don't clean up their memory.
Reviewers: danalbert, jroelofs, mclow.lists
Reviewed By: jroelofs
Subscribers: dblaikie, cfe-commits
Differential Revision: http://reviews.llvm.org/D6281
llvm-svn: 222493
Diffstat (limited to 'libcxxabi/test/inherited_exception.cpp')
| -rw-r--r-- | libcxxabi/test/inherited_exception.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libcxxabi/test/inherited_exception.cpp b/libcxxabi/test/inherited_exception.cpp index 090ae975361..7c106c1e612 100644 --- a/libcxxabi/test/inherited_exception.cpp +++ b/libcxxabi/test/inherited_exception.cpp @@ -56,11 +56,11 @@ void f2() { } void f3() { - Child* child = new Child; - child->b1 = 10; - child->b2 = 11; - child->c = 12; - throw static_cast<Base2*>(child); + static Child child; + child.b1 = 10; + child.b2 = 11; + child.c = 12; + throw static_cast<Base2*>(&child); } int main() |

