aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-dependent-nested-name.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-06-13 04:51:30 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-06-13 04:51:30 +0000
commit923f7534c529be478826f3d390d70dd8575dfd72 (patch)
tree16d0d0a4a3a9a5e65afd408723fc2aadf502086d /test/SemaTemplate/instantiate-dependent-nested-name.cpp
parent31a08752eda39ca17154538e2f2587f8d339a1fa (diff)
Fix for PR4382: allow instantiating dependent nested name specifiers.
I'm not completely sure this is the right way to fix this issue, but it seems reasonable, and it's consistent with the non-template code for this construct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-dependent-nested-name.cpp')
-rw-r--r--test/SemaTemplate/instantiate-dependent-nested-name.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-dependent-nested-name.cpp b/test/SemaTemplate/instantiate-dependent-nested-name.cpp
new file mode 100644
index 0000000000..2b1d29878a
--- /dev/null
+++ b/test/SemaTemplate/instantiate-dependent-nested-name.cpp
@@ -0,0 +1,7 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+// PR4382
+template<typename T> struct X { static const T A = 1; };
+template<typename T, bool = X<T>::A> struct Y { typedef T A; };
+template<typename T> struct Z { typedef typename Y<T>::A A; };
+extern int x;
+extern Z<int>::A x;