diff options
Diffstat (limited to 'clang/test/CXX')
-rw-r--r-- | clang/test/CXX/class.access/p4.cpp | 10 | ||||
-rw-r--r-- | clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/clang/test/CXX/class.access/p4.cpp b/clang/test/CXX/class.access/p4.cpp index 6d452d8199e..a2d0da1a832 100644 --- a/clang/test/CXX/class.access/p4.cpp +++ b/clang/test/CXX/class.access/p4.cpp @@ -514,16 +514,12 @@ namespace test17 { } namespace test18 { - template <class T> class A {}; - class B : A<int> { + template <class T> class A {}; // expected-note {{member is declared here}} + class B : A<int> { // expected-note {{constrained by implicitly private inheritance here}} A<int> member; }; - - // FIXME: this access to A should be forbidden (because C++ is dumb), - // but LookupResult can't express the necessary information to do - // the check, so we aggressively suppress access control. class C : B { - A<int> member; + A<int> member; // expected-error {{'A' is a private member of 'test18::A<int>'}} }; } diff --git a/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp b/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp index 849728a448b..ab1b9f7a73e 100644 --- a/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp +++ b/clang/test/CXX/temp/temp.decls/temp.friend/p1.cpp @@ -380,10 +380,10 @@ template <class T> struct A { namespace test18 { namespace ns1 { template <class T> struct foo {}; } // expected-note{{candidate ignored: not a function template}} namespace ns2 { void foo() {} } // expected-note{{candidate ignored: not a function template}} -using ns1::foo; -using ns2::foo; +using ns1::foo; // expected-note {{found by name lookup}} +using ns2::foo; // expected-note {{found by name lookup}} template <class T> class A { - friend void foo<T>() {} // expected-error{{no candidate function template was found for dependent friend function template specialization}} + friend void foo<T>() {} // expected-error {{ambiguous}} expected-error{{no candidate function template was found for dependent friend function template specialization}} }; } |