diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-01-19 06:46:48 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-01-19 06:46:48 +0000 |
| commit | a3b624aa557cbb153dc8fc3443ffdd7f540a0505 (patch) | |
| tree | 87f9011240c44502400236496f090a677281b095 /clang/test/SemaTemplate | |
| parent | 3024e9813ecb7a0816ca0f5c0d27cdac84fea4fb (diff) | |
| download | bcm5719-llvm-a3b624aa557cbb153dc8fc3443ffdd7f540a0505.tar.gz bcm5719-llvm-a3b624aa557cbb153dc8fc3443ffdd7f540a0505.zip | |
In a mem-initializer, a nested-name-specifier followed by an
identifier always names a type. In the case of a dependent
nested-name-specifier, build a TypenameType to describe the dependent
base type. I'd like to move more of this behavior up into the parser,
but this fixes PR6062.
llvm-svn: 93871
Diffstat (limited to 'clang/test/SemaTemplate')
| -rw-r--r-- | clang/test/SemaTemplate/dependent-base-member-init.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/dependent-base-member-init.cpp b/clang/test/SemaTemplate/dependent-base-member-init.cpp index c9823d227d4..31093758064 100644 --- a/clang/test/SemaTemplate/dependent-base-member-init.cpp +++ b/clang/test/SemaTemplate/dependent-base-member-init.cpp @@ -34,3 +34,21 @@ template<typename T> struct s1 : s0<typename s0_traits<T>::t0> { s1() {} }; +// PR6062 +namespace PR6062 { + template <typename T> + class A : public T::type + { + A() : T::type() + { + } + + template <typename U> + A(U const& init) + : T::type(init) + { } + + template<typename U> + A(U& init) : U::other_type(init) { } + }; +} |

