aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-09 23:48:53 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-09 23:48:53 +0000
commit1a873ae65f8814eae6c9b8786f164ce70c645a21 (patch)
tree3842385ea167c93f30a3701984d2a03b3659bf46
parent40808ce6ac04b102c3b56244a635d6b98eed6d97 (diff)
Add a test case that goes with the last commit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66510 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/SemaTemplate/instantiation-default-3.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiation-default-3.cpp b/test/SemaTemplate/instantiation-default-3.cpp
new file mode 100644
index 0000000000..b9379d6690
--- /dev/null
+++ b/test/SemaTemplate/instantiation-default-3.cpp
@@ -0,0 +1,21 @@
+// RUN: clang -fsyntax-only -verify %s
+
+template<typename T> struct A { };
+
+template<typename T, typename U = A<T*> >
+ struct B : U { };
+
+template<>
+struct A<int*> {
+ void foo();
+};
+
+template<>
+struct A<float*> {
+ void bar();
+};
+
+void test(B<int> *b1, B<float> *b2) {
+ b1->foo();
+ b2->bar();
+}