diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /test/SemaCXX/nested-name-spec.cpp | |
parent | bb67ca86b31f67faee50bd10c3b036d65751745a (diff) | |
download | FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz |
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/SemaCXX/nested-name-spec.cpp')
-rw-r--r-- | test/SemaCXX/nested-name-spec.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp index b317634..4e1abc5 100644 --- a/test/SemaCXX/nested-name-spec.cpp +++ b/test/SemaCXX/nested-name-spec.cpp @@ -143,7 +143,7 @@ namespace A { void g(int&); // expected-note{{type of 1st parameter of member declaration does not match definition ('int &' vs 'const int &')}} } -void A::f() {} // expected-error{{out-of-line definition of 'f' does not match any declaration in namespace 'A'}} +void A::f() {} // expected-error-re{{out-of-line definition of 'f' does not match any declaration in namespace 'A'$}} void A::g(const int&) { } // expected-error{{out-of-line definition of 'g' does not match any declaration in namespace 'A'}} @@ -286,3 +286,15 @@ protected: template <typename T> struct A2<T>::B::C; // expected-error {{no struct named 'C'}} } + +namespace PR13033 { +namespace NS { + int a; // expected-note {{'NS::a' declared here}} + int longer_b; //expected-note {{'NS::longer_b' declared here}} +} + +// Suggest adding a namespace qualifier to both variable names even though one +// is only a single character long. +int foobar = a + longer_b; // expected-error {{use of undeclared identifier 'a'; did you mean 'NS::a'?}} \ + // expected-error {{use of undeclared identifier 'longer_b'; did you mean 'NS::longer_b'?}} +} |