Files
theraven 6317b79a10 Implemented the new exception ABI, and a load of tests for it. This is used by
clang trunk if -fobjc-runtime-1.7 is specified and provides significantly
better interoperability with foreign exceptions.

Note: Most of the exception tests will not pass with gcc or clang < 3.3.  They
test things that are impossible to implement quite correctly with the
GCC-compatible exception ABI.

Also updated the release notes to reflect recent improvements.
2013-01-12 13:17:36 +00:00

39 lines
361 B
Objective-C

#include "Test.h"
#if __cplusplus
#error This is not an ObjC++ test!
#endif
id a;
int throw(void)
{
@throw a;
}
int main(void)
{
id e1 = [Test new];
id e2 = [Test new];
@try
{
a = e1;
throw();
}
@catch (id x)
{
assert(x == e1);
@try {
a = e2;
}
@catch (id y)
{
assert(y == e2);
}
}
[e1 dealloc];
[e2 dealloc];
return 0;
}