• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -triple i386-apple-macosx10.6.6 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -fobjc-exceptions -fcxx-exceptions -fexceptions -o - %s | FileCheck %s
2// rdar://8940528
3
4@interface ns_array
5+ (id) array;
6@end
7
8@implementation ns_array
9+ (id) array { return 0; }
10@end
11
12id Groups();
13
14@protocol P @end;
15
16@interface INTF<P> {
17    double dd;
18}
19@end
20
21id FUNC() {
22    id groups;
23    try
24    {
25      groups = Groups();  // throws on errors.
26    }
27    catch( INTF<P>* error )
28    {
29      Groups();
30    }
31    catch( id error )
32    {
33      // CHECK:      landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
34      // CHECK-NEXT:   catch i8* bitcast ({ i8*, i8*, i32, i8* }* @_ZTIPU11objcproto1P4INTF to i8*)
35      // CHECK-NEXT:   catch i8* bitcast ({ i8*, i8*, i32, i8* }* @_ZTIP11objc_object to i8*)
36      // CHECK-NEXT:   catch i8* bitcast ({ i8*, i8*, i32, i8* }* @_ZTIP10objc_class to i8*)
37      error = error;
38      groups = [ns_array array];
39    }
40    catch (Class cl) {
41      cl = cl;
42      groups = [ns_array array];
43    }
44    return groups;
45
46}
47
48int main() {
49  FUNC();
50  return 0;
51}
52