summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/friend-template.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-30 22:42:42 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-30 22:42:42 +0000
commit259571e27e513cfaf691cc7447e09b31a47d5438 (patch)
tree05709f41ebcbf2eb326c037eed9ffbf0305e9b6f /test/SemaTemplate/friend-template.cpp
parentc78c06d81f9838aea4198e4965cc1b26bb0bf838 (diff)
downloadclang-259571e27e513cfaf691cc7447e09b31a47d5438.tar.gz
When a friend is declared in a dependent context, don't even try to
match it up with a declaration in the outer scope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85628 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/friend-template.cpp')
-rw-r--r--test/SemaTemplate/friend-template.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaTemplate/friend-template.cpp b/test/SemaTemplate/friend-template.cpp
index dc277f4657..84a8e899db 100644
--- a/test/SemaTemplate/friend-template.cpp
+++ b/test/SemaTemplate/friend-template.cpp
@@ -72,3 +72,22 @@ class Foo {
};
Foo<int> foo;
+
+template<typename T, T Value>
+struct X2a;
+
+template<typename T, int Size>
+struct X2b;
+
+template<typename T>
+class X3 {
+ template<typename U, U Value>
+ friend struct X2a;
+
+ template<typename U, T Value>
+ friend struct X2b;
+};
+
+X3<int> x3i; // okay
+
+X3<long> x3l; // FIXME: should cause an instantiation-time failure