diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-05-24 00:01:49 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-05-24 00:01:49 +0000 |
| commit | 22e7cc6a324d1ff41e981830634361e1b2e1eb9e (patch) | |
| tree | d76f250a4cad4d868936d1295cd048f6760f8512 /clang/test/SemaCXX/friend.cpp | |
| parent | b09ac4a78da42eab1038e609328ef3b67377d10c (diff) | |
| download | bcm5719-llvm-22e7cc6a324d1ff41e981830634361e1b2e1eb9e.tar.gz bcm5719-llvm-22e7cc6a324d1ff41e981830634361e1b2e1eb9e.zip | |
Properly track the found declaration (possibly a using-declaration) when
handling an explicit member specialization.
llvm-svn: 270514
Diffstat (limited to 'clang/test/SemaCXX/friend.cpp')
| -rw-r--r-- | clang/test/SemaCXX/friend.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/friend.cpp b/clang/test/SemaCXX/friend.cpp index c90ce74616d..4f27f4df6c9 100644 --- a/clang/test/SemaCXX/friend.cpp +++ b/clang/test/SemaCXX/friend.cpp @@ -147,11 +147,13 @@ namespace test8 { } using ns2::f; // expected-note {{using declaration}} } - struct A { void f(); }; // expected-note {{target of using declaration}} + struct A { void f(); }; // expected-note 2{{target of using declaration}} struct B : public A { using A::f; }; // expected-note {{using declaration}} + template<typename T> struct C : A { using A::f; }; // expected-note {{using declaration}} struct X { template<class T> friend void ns1::f(T t); // expected-error {{cannot befriend target of using declaration}} friend void B::f(); // expected-error {{cannot befriend target of using declaration}} + friend void C<int>::f(); // expected-error {{cannot befriend target of using declaration}} }; } |

