diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-30 04:39:27 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-30 04:39:27 +0000 |
commit | 9ffce2182e4fe72052d620698d272207f494b1cf (patch) | |
tree | 0924d704e6d3e14437ba6eeedef753d5b595310d /test/SemaTemplate/injected-class-name.cpp | |
parent | a8b4a1e26ae91e5113892702c5a6a2824adca777 (diff) |
When we start the definition of a class template, set the
InjectedClassNameType's Decl to point at the definition. It's a little
messy, but we do the same thing with classes and their record types,
since much of Clang expects that the TagDecl* one gets out of a type
is the definition. Fixes several Boost.Proto failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102691 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/injected-class-name.cpp')
-rw-r--r-- | test/SemaTemplate/injected-class-name.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaTemplate/injected-class-name.cpp b/test/SemaTemplate/injected-class-name.cpp index 586be189b0..4c21d2585d 100644 --- a/test/SemaTemplate/injected-class-name.cpp +++ b/test/SemaTemplate/injected-class-name.cpp @@ -48,3 +48,15 @@ namespace pr6326 { }; template class A<int>; } + +namespace ForwardDecls { + template<typename T> + struct X; + + template<typename T> + struct X { + typedef T foo; + typedef X<T> xt; + typename xt::foo *t; + }; +} |