diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-16 19:09:40 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-16 19:09:40 +0000 |
commit | fe17d2550b84202b599a86e0f4f4f1f4729deb30 (patch) | |
tree | fa7afad5e8ea21a0329f74811ad2421169b54bee /clang/lib/Sema/SemaTemplate.cpp | |
parent | 300048631b2e497141fb2492f083aa398f3649fd (diff) | |
download | bcm5719-llvm-fe17d2550b84202b599a86e0f4f4f1f4729deb30.tar.gz bcm5719-llvm-fe17d2550b84202b599a86e0f4f4f1f4729deb30.zip |
Improve parsing and instantiation of destructor names, so that we can
now cope with the destruction of types named as dependent templates,
e.g.,
y->template Y<T>::~Y()
Nominally, we implement C++0x [basic.lookup.qual]p6. However, we don't
follow the letter of the standard here because that would fail to
parse
template<typename T, typename U>
X0<T, U>::~X0() { }
properly. The problem is captured in core issue 339, which gives some
(but not enough!) guidance. I expect to revisit this code when the
resolution of 339 is clear, and/or we start capturing better source
information for DeclarationNames.
Fixes PR6152.
llvm-svn: 96367
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 10e411f5825..c98f88f86aa 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -4911,18 +4911,21 @@ namespace { /// \brief Transforms a typename type by determining whether the type now /// refers to a member of the current instantiation, and then /// type-checking and building a QualifiedNameType (when possible). - QualType TransformTypenameType(TypeLocBuilder &TLB, TypenameTypeLoc TL); + QualType TransformTypenameType(TypeLocBuilder &TLB, TypenameTypeLoc TL, + QualType ObjectType); }; } QualType CurrentInstantiationRebuilder::TransformTypenameType(TypeLocBuilder &TLB, - TypenameTypeLoc TL) { + TypenameTypeLoc TL, + QualType ObjectType) { TypenameType *T = TL.getTypePtr(); NestedNameSpecifier *NNS = TransformNestedNameSpecifier(T->getQualifier(), - /*FIXME:*/SourceRange(getBaseLocation())); + /*FIXME:*/SourceRange(getBaseLocation()), + ObjectType); if (!NNS) return QualType(); |