aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/default-expr-arguments.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-26 14:36:57 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-26 14:36:57 +0000
commit087fb7d0b5e08f34b2e28a09c376f66449f30886 (patch)
tree54f8b59e514067f9c5260f527a9daa207ebb1f56 /test/SemaTemplate/default-expr-arguments.cpp
parentb19f0ac4b68a60b88696dab1794cce33f273425f (diff)
Ensure that we have completed a type before attempting initialization
on that type. Fixes several problems in Boost.Interprocess. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102339 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/default-expr-arguments.cpp')
-rw-r--r--test/SemaTemplate/default-expr-arguments.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaTemplate/default-expr-arguments.cpp b/test/SemaTemplate/default-expr-arguments.cpp
index 40b7f2b3cf..7c3525a1fb 100644
--- a/test/SemaTemplate/default-expr-arguments.cpp
+++ b/test/SemaTemplate/default-expr-arguments.cpp
@@ -188,3 +188,21 @@ template<> void f4<int>(int, int);
void f4_test(int i) {
f4(i);
}
+
+// Instantiate for initialization
+namespace InstForInit {
+ template<typename T>
+ struct Ptr {
+ typedef T* type;
+ Ptr(type);
+ };
+
+ template<typename T>
+ struct Holder {
+ Holder(int i, Ptr<T> ptr = 0);
+ };
+
+ void test_holder(int i) {
+ Holder<int> h(i);
+ }
+};