11b257afbae854c6817f26b7d61c4fed8ff7aebadDouglas Gregor@import redecl_merge_top; 2a1be278c4f3a234ff61f04018d26c6beecde1654Douglas Gregor 3a1be278c4f3a234ff61f04018d26c6beecde1654Douglas Gregor@interface Super 4a1be278c4f3a234ff61f04018d26c6beecde1654Douglas Gregor@end 5a1be278c4f3a234ff61f04018d26c6beecde1654Douglas Gregor 6a1be278c4f3a234ff61f04018d26c6beecde1654Douglas Gregor@interface A : Super 7a1be278c4f3a234ff61f04018d26c6beecde1654Douglas Gregor- (Super*)init; 8a1be278c4f3a234ff61f04018d26c6beecde1654Douglas Gregor@end 9a1be278c4f3a234ff61f04018d26c6beecde1654Douglas Gregor 10ecb19382e1041f4e90f44c541173b85e4f328b84Douglas Gregor@class B; 11ecb19382e1041f4e90f44c541173b85e4f328b84Douglas Gregor 1227c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor@protocol P1 1327c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor- (void)protoMethod1; 1427c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor@end 1527c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor 1627c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor@protocol P1; 1727c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor 1827c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor@protocol P2; 1927c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor 2027c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor@protocol P2; 2127c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor 2227c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor@protocol P2; 2327c6da284f90e32cda0ec8f52a2b6ba5a2613252Douglas Gregor 241ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregorstruct S1; 251ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregorstruct S2; 261ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregor 271ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregorvoid consume_S1(struct S1*); 281ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregorstruct S2 *produce_S2(void); 291ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregor 300f75323264b93a318ac9007eb5ec5b233c444068Douglas Gregor// Test declarations in different modules with no common initial 310f75323264b93a318ac9007eb5ec5b233c444068Douglas Gregor// declaration. 320f75323264b93a318ac9007eb5ec5b233c444068Douglas Gregor@class C; 330f75323264b93a318ac9007eb5ec5b233c444068Douglas GregorC *get_a_C(void); 340f75323264b93a318ac9007eb5ec5b233c444068Douglas Gregor@class C2; 350f75323264b93a318ac9007eb5ec5b233c444068Douglas GregorC2 *get_a_C2(void); 360f75323264b93a318ac9007eb5ec5b233c444068Douglas Gregor@class C3; 370f75323264b93a318ac9007eb5ec5b233c444068Douglas GregorC3 *get_a_C3(void); 380f75323264b93a318ac9007eb5ec5b233c444068Douglas Gregor 39cce54aa6a40e4c39b25532336e17ce40f0a7e087Douglas Gregor@class C4; 40cce54aa6a40e4c39b25532336e17ce40f0a7e087Douglas Gregor@class C4; 41cce54aa6a40e4c39b25532336e17ce40f0a7e087Douglas Gregor@class C4; 42cce54aa6a40e4c39b25532336e17ce40f0a7e087Douglas Gregor@class C4; 43cce54aa6a40e4c39b25532336e17ce40f0a7e087Douglas GregorC4 *get_a_C4(void); 44cce54aa6a40e4c39b25532336e17ce40f0a7e087Douglas Gregor 452ccd89cff3f1c18b48f649240302446a7dae28b9Douglas Gregor@class Explicit; 462ccd89cff3f1c18b48f649240302446a7dae28b9Douglas Gregor 472ccd89cff3f1c18b48f649240302446a7dae28b9Douglas Gregorint *explicit_func(void); 482ccd89cff3f1c18b48f649240302446a7dae28b9Douglas Gregor 492ccd89cff3f1c18b48f649240302446a7dae28b9Douglas Gregorstruct explicit_struct; 502ccd89cff3f1c18b48f649240302446a7dae28b9Douglas Gregor 51dba9361891ab147b6ea658c1834bc1d660f5226bDouglas Gregor@protocol P4, P3; 52dba9361891ab147b6ea658c1834bc1d660f5226bDouglas Gregor@protocol P3; 53dba9361891ab147b6ea658c1834bc1d660f5226bDouglas Gregor@protocol P3; 54dba9361891ab147b6ea658c1834bc1d660f5226bDouglas Gregor@protocol P3; 55dba9361891ab147b6ea658c1834bc1d660f5226bDouglas Gregor 561ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregorstruct S3; 571ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregorstruct S4; 581ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregor 591ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregorvoid consume_S3(struct S3*); 601ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregorstruct S4 *produce_S4(void); 611ca4a5c41b8707b5fafcd1af1c9824b1bb19a399Douglas Gregor 627a537404f039d4b7d063bbdc3c8c924be977dff2Douglas Gregortypedef int T1; 637a537404f039d4b7d063bbdc3c8c924be977dff2Douglas Gregortypedef double T2; 647a537404f039d4b7d063bbdc3c8c924be977dff2Douglas Gregor 657076281fcaab2a01e6226b05c822dd3142167636Douglas Gregorint func0(int); 667076281fcaab2a01e6226b05c822dd3142167636Douglas Gregorint func1(int); 677076281fcaab2a01e6226b05c822dd3142167636Douglas Gregorint func1(int); 685456b0fe40714a78cd0ba7c1a5b7dc34eda385afDouglas Gregorint func1(int x) { return x; } 697076281fcaab2a01e6226b05c822dd3142167636Douglas Gregorint func1(int); 707076281fcaab2a01e6226b05c822dd3142167636Douglas Gregorstatic int func2(int); 717076281fcaab2a01e6226b05c822dd3142167636Douglas Gregor 724791fa2c3c16c51c8435706682ec0fec8647335aDouglas Gregor 734791fa2c3c16c51c8435706682ec0fec8647335aDouglas Gregor 744791fa2c3c16c51c8435706682ec0fec8647335aDouglas Gregor 754791fa2c3c16c51c8435706682ec0fec8647335aDouglas Gregor// Spacing matters! 764791fa2c3c16c51c8435706682ec0fec8647335aDouglas Gregorextern int var1; 774791fa2c3c16c51c8435706682ec0fec8647335aDouglas Gregorextern int var2; 784791fa2c3c16c51c8435706682ec0fec8647335aDouglas Gregor 794791fa2c3c16c51c8435706682ec0fec8647335aDouglas Gregorstatic double var3; 804791fa2c3c16c51c8435706682ec0fec8647335aDouglas Gregor 811d4c1137c314cfb9ced32006cacdb80deffb66d4Douglas Gregorint ONE; 821b257afbae854c6817f26b7d61c4fed8ff7aebadDouglas Gregor@import redecl_merge_top.Explicit; 831d4c1137c314cfb9ced32006cacdb80deffb66d4Douglas Gregorconst int one = ONE; 84cc32b44ea4b3c702bf84eae0af27ca160bd90831Douglas Gregor 85cc32b44ea4b3c702bf84eae0af27ca160bd90831Douglas Gregor@interface ClassWithDef 86cc32b44ea4b3c702bf84eae0af27ca160bd90831Douglas Gregor- (void)method; 87cc32b44ea4b3c702bf84eae0af27ca160bd90831Douglas Gregor@end 88aa945900d5438984bdcaac85c4f54868292231f4Douglas Gregor 89aa945900d5438984bdcaac85c4f54868292231f4Douglas Gregorvoid eventually_noreturn(void) __attribute__((noreturn)); 90aa945900d5438984bdcaac85c4f54868292231f4Douglas Gregorvoid eventually_noreturn2(void) __attribute__((noreturn)); 91