• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -triple i386-apple-macosx10.6.6 -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: call i32 (i8*, i8*, ...)* @llvm.eh.selector({{.*}} @__gxx_personality_v0 {{.*}} @_ZTIP4INTF {{.*}} @_ZTIP11objc_object {{.*}} @_ZTIP10objc_class
34      error = error;
35      groups = [ns_array array];
36    }
37    catch (Class cl) {
38      cl = cl;
39      groups = [ns_array array];
40    }
41    return groups;
42
43}
44
45int main() {
46  FUNC();
47  return 0;
48}
49