aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-expr-2.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-17 21:40:42 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-17 21:40:42 +0000
commit089407be3fb616fb1246f2aee29b8a9c58ec7807 (patch)
treeeefbf6893de67bec32aeb1304f23ae9902cfa896 /test/SemaTemplate/instantiate-expr-2.cpp
parent07ab20203fb4254f6152c9a7176732fe199adccd (diff)
When type-checking a C++ "new" expression, don't type-check the actual
initialization if any of the constructor/initialization arguments are type-dependent. Fixes PR5224. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-expr-2.cpp')
-rw-r--r--test/SemaTemplate/instantiate-expr-2.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-expr-2.cpp b/test/SemaTemplate/instantiate-expr-2.cpp
index 146e63c5bb..194593ac40 100644
--- a/test/SemaTemplate/instantiate-expr-2.cpp
+++ b/test/SemaTemplate/instantiate-expr-2.cpp
@@ -178,3 +178,18 @@ namespace N10 {
template class A<int>;
}
+
+namespace N12 {
+ // PR5224
+ template<typename T>
+ struct A { typedef int t0; };
+
+ struct C {
+ C(int);
+
+ template<typename T>
+ static C *f0(T a0) {return new C((typename A<T>::t0) 1); }
+ };
+
+ void f0(int **a) { C::f0(a); }
+}