1// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-gc -fsyntax-only -verify %s
2@interface INTF @end
3
4extern INTF* p2;
5extern __strong INTF* p2;
6
7extern __strong id p1;
8extern id p1;
9
10extern id CFRunLoopGetMain();
11extern __strong id CFRunLoopGetMain();
12
13extern __strong id CFRunLoopGetMain2();
14extern id CFRunLoopGetMain2();
15
16extern INTF* CFRunLoopGetMain3();
17extern __strong INTF* CFRunLoopGetMain3();
18
19extern __strong INTF* CFRunLoopGetMain4();
20extern INTF* CFRunLoopGetMain4();
21
22typedef id ID;
23extern ID CFRunLoopGetMain5();
24extern __strong id CFRunLoopGetMain5();
25
26extern __strong id CFRunLoopGetMain6();
27extern ID CFRunLoopGetMain6();
28
29extern ID CFRunLoopGetMain7();
30extern __strong ID CFRunLoopGetMain7();
31
32extern __strong ID CFRunLoopGetMain8();
33extern ID CFRunLoopGetMain8();
34
35extern __weak id WLoopGetMain(); // expected-note {{previous declaration is here}}
36extern id WLoopGetMain();	// expected-error {{functions that differ only in their return type cannot be overloaded}}
37
38extern id p3;	// expected-note {{previous definition is here}}
39extern __weak id p3;	// expected-error {{redefinition of 'p3' with a different type}}
40
41extern void *p4; // expected-note {{previous definition is here}}
42extern void * __strong p4; // expected-error {{redefinition of 'p4' with a different type}}
43
44extern id p5;
45extern __strong id p5;
46
47extern char* __strong p6; // expected-note {{previous definition is here}}
48extern char* p6; // expected-error {{redefinition of 'p6' with a different type}}
49
50extern __strong char* p7; // expected-note {{previous definition is here}}
51extern char* p7; // expected-error {{redefinition of 'p7' with a different type}}
52