2012-02-05 02:56:43 +08:00
|
|
|
// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
|
2008-01-19 08:42:38 +08:00
|
|
|
|
2008-02-02 04:02:07 +08:00
|
|
|
@interface Foo @end
|
2008-01-19 08:42:38 +08:00
|
|
|
@interface GARF @end
|
|
|
|
|
2008-02-02 04:02:07 +08:00
|
|
|
void foo() {
|
|
|
|
@try { TRY(); }
|
|
|
|
@catch (...) { SPLATCH(); @throw; }
|
|
|
|
}
|
|
|
|
|
2008-01-19 08:42:38 +08:00
|
|
|
int main()
|
|
|
|
{
|
|
|
|
|
2008-07-16 23:31:30 +08:00
|
|
|
@try {
|
|
|
|
MYTRY();
|
|
|
|
}
|
2008-01-19 08:42:38 +08:00
|
|
|
|
2008-07-16 23:31:30 +08:00
|
|
|
@catch (Foo* localException) {
|
|
|
|
MYCATCH();
|
|
|
|
@throw;
|
|
|
|
}
|
|
|
|
|
|
|
|
// no catch clause
|
|
|
|
@try { }
|
|
|
|
@finally { }
|
2008-01-19 08:42:38 +08:00
|
|
|
}
|
|
|
|
|