2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -rewrite-objc %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
|
|
|
}
|
|
|
|
|