summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/constructor-template.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-15 18:26:13 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-15 18:26:13 +0000
commit31fae894977943930d22d02c9663ca18c8bc1e68 (patch)
tree07c8cc69209b01366f874a2762fcac7ecf7d8d2e /clang/test/SemaTemplate/constructor-template.cpp
parentc25359e1a30d7422ba8f56bb0f385a6de45e7bc9 (diff)
downloadbcm5719-llvm-31fae894977943930d22d02c9663ca18c8bc1e68.tar.gz
bcm5719-llvm-31fae894977943930d22d02c9663ca18c8bc1e68.zip
Add an assertion and a test case, in a fruitless attempt to track down an existing bug
llvm-svn: 81885
Diffstat (limited to 'clang/test/SemaTemplate/constructor-template.cpp')
-rw-r--r--clang/test/SemaTemplate/constructor-template.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/constructor-template.cpp b/clang/test/SemaTemplate/constructor-template.cpp
index 5a2630c2cff..41b0d29cf83 100644
--- a/clang/test/SemaTemplate/constructor-template.cpp
+++ b/clang/test/SemaTemplate/constructor-template.cpp
@@ -26,3 +26,23 @@ void test_X0(int i, float f) {
X0 x0g(f, &i); // expected-error{{no matching constructor}}
}
+
+template<typename T>
+struct X1 {
+ X1(const X1&);
+ template<typename U> X1(const X1<U>&);
+};
+
+template<typename T>
+struct Outer {
+ typedef X1<T> A;
+
+ A alloc;
+
+ explicit Outer(const A& a) : alloc(a) { }
+};
+
+void test_X1(X1<int> xi) {
+ Outer<int> oi(xi);
+ Outer<float> of(xi);
+}
OpenPOWER on IntegriCloud