1651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinesnamespace RedeclAcrossImport { 2651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines enum E { e }; 3651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines} 4651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 5651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinesnamespace AddAndReexportBeforeImport { 6651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines struct S {}; 7651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines extern struct S t; 8651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines} 9651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 101b257afbae854c6817f26b7d61c4fed8ff7aebadDouglas Gregor@import namespaces_top; 11f5c9f9fd6f5e2850b9b0f19283430245b696c6e5Douglas Gregor 12651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinesnamespace RedeclAcrossImport { 13651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines E x = e; 14651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines} 15651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 16bbcd0f3ba215d5a8857b224e32b0330586a00dc6Richard Smithfloat &global(float); 17bbcd0f3ba215d5a8857b224e32b0330586a00dc6Richard Smithfloat &global2(float); 18bbcd0f3ba215d5a8857b224e32b0330586a00dc6Richard Smith 19bbcd0f3ba215d5a8857b224e32b0330586a00dc6Richard Smithnamespace LookupBeforeImport { 20bbcd0f3ba215d5a8857b224e32b0330586a00dc6Richard Smith float &f(float); 21bbcd0f3ba215d5a8857b224e32b0330586a00dc6Richard Smith} 22bbcd0f3ba215d5a8857b224e32b0330586a00dc6Richard Smith 23f5c9f9fd6f5e2850b9b0f19283430245b696c6e5Douglas Gregornamespace N1 { } 24f5c9f9fd6f5e2850b9b0f19283430245b696c6e5Douglas Gregor 25f5c9f9fd6f5e2850b9b0f19283430245b696c6e5Douglas Gregornamespace N1 { 26f5c9f9fd6f5e2850b9b0f19283430245b696c6e5Douglas Gregor float& f(float); 27f5c9f9fd6f5e2850b9b0f19283430245b696c6e5Douglas Gregor} 28f5c9f9fd6f5e2850b9b0f19283430245b696c6e5Douglas Gregor 29f5c9f9fd6f5e2850b9b0f19283430245b696c6e5Douglas Gregornamespace N2 { 30f5c9f9fd6f5e2850b9b0f19283430245b696c6e5Douglas Gregor float& f(float); 31f5c9f9fd6f5e2850b9b0f19283430245b696c6e5Douglas Gregor} 32c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor 33c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor 34c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor 35c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor 36c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor 37c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregornamespace N5 { 38c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor int &f(int); 39c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor} 40c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor 41c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregornamespace N6 { 42c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor int &f(int); 43c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor} 44c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor 45c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregornamespace N7 { 46c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor int &f(int); 47c6c8e0ec96bb64f1b9f543d7c8317c6090f80a30Douglas Gregor} 480fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregor 490fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregornamespace N8 { 500fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregor int &f(int); 510fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregor} 520fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregor 530fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregornamespace N9 { 540fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregor int &f(int); 550fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregor} 560fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregor 570fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregornamespace N10 { 580fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregor int &f(int); 590fdc09fe680787b855cf20183c4bd3b83f2c907fDouglas Gregor} 601c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor 611c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregornamespace N11 { 621c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor namespace { 631c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor class Foo; 641c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor } 651c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor Foo *getFoo(); 661c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor} 671c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor 681c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregornamespace N12 { 691c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor namespace { 701c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor class Foo; 711c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor } 721c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor Foo *getFoo(); 731c3875dab92f3b0a25212c80863e452cb269d3f1Douglas Gregor} 74