]> granicus.if.org Git - clang/commitdiff
Add a test case that goes with the last commit
authorDouglas Gregor <dgregor@apple.com>
Mon, 9 Mar 2009 23:48:53 +0000 (23:48 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 9 Mar 2009 23:48:53 +0000 (23:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66510 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaTemplate/instantiation-default-3.cpp [new file with mode: 0644]

diff --git a/test/SemaTemplate/instantiation-default-3.cpp b/test/SemaTemplate/instantiation-default-3.cpp
new file mode 100644 (file)
index 0000000..b9379d6
--- /dev/null
@@ -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();
+}