diff options
Diffstat (limited to 'test/FixIt/typo.cpp')
-rw-r--r-- | test/FixIt/typo.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/FixIt/typo.cpp b/test/FixIt/typo.cpp index 5b9e68bbfd3d..077aa9c6f78f 100644 --- a/test/FixIt/typo.cpp +++ b/test/FixIt/typo.cpp @@ -12,7 +12,8 @@ namespace std { typedef basic_string<char> string; // expected-note 2{{'string' declared here}} } -namespace otherstd { // expected-note 2{{'otherstd' declared here}} +namespace otherstd { // expected-note 2{{'otherstd' declared here}} \ + // expected-note{{namespace 'otherstd' defined here}} using namespace std; } @@ -29,6 +30,13 @@ float area(float radius, // expected-note{{'radius' declared here}} return radious * pi; // expected-error{{did you mean 'radius'?}} } +using namespace othestd; // expected-error{{no namespace named 'othestd'; did you mean 'otherstd'?}} +namespace blargh = otherstd; // expected-note 3{{namespace 'blargh' defined here}} +using namespace ::blarg; // expected-error{{no namespace named 'blarg' in the global namespace; did you mean 'blargh'?}} + +namespace wibble = blarg; // expected-error{{no namespace named 'blarg'; did you mean 'blargh'?}} +namespace wobble = ::blarg; // expected-error{{no namespace named 'blarg' in the global namespace; did you mean 'blargh'?}} + bool test_string(std::string s) { basc_string<char> b1; // expected-error{{no template named 'basc_string'; did you mean 'basic_string'?}} std::basic_sting<char> b2; // expected-error{{no template named 'basic_sting' in namespace 'std'; did you mean 'basic_string'?}} |