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