http://llvm.org/bugs/show_bug.cgi?id=6756
Summary: exception object not destructed
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
This test should pass:
#include <stdio.h>
#include <assert.h>
struct A
{
static int constructed;
int data_;
explicit A(int data = 0) : data_(data)
{
++constructed;
}
~A()
{
--constructed;
}
A(const A& a)
: data_(a.data_)
{
++constructed;
}
private:
A& operator=(const A&);
};
int A::constructed = 0;
int main()
{
try
{
throw A(5);
assert(false);
}
catch (A& a)
{
assert(a.data_ == 5);
assert(A::constructed == 1);
}
printf("J: %d\n", A::constructed);
assert(A::constructed == 0);
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs