From c392f37ae81d99a29c95dafb964e52492f2e0f37 Mon Sep 17 00:00:00 2001 From: John McCall Date: Fri, 11 Jun 2010 00:33:02 +0000 Subject: Split DependentNameType into two types. DependentNameType represents the case of an elaborated-type-specifier like 'typename A::foo', and DependentTemplateSpecializationType represents the case of an elaborated-type-specifier like 'typename A::template B'. The TypeLoc representation of a DependentTST conveniently exactly matches that of an ElaboratedType wrapping a TST. Kill off the explicit rebuild methods for RebuildInCurrentInstantiation; the standard implementations work fine because the nested name specifier is computable in the newly-entered context. llvm-svn: 105801 --- clang/lib/Sema/SemaTemplateDeduction.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'clang/lib/Sema/SemaTemplateDeduction.cpp') diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index 88ceeca58a6..403d5543a64 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -2624,6 +2624,18 @@ MarkUsedTemplateParameters(Sema &SemaRef, QualType T, OnlyDeduced, Depth, Used); break; + case Type::DependentTemplateSpecialization: { + const DependentTemplateSpecializationType *Spec + = cast(T); + if (!OnlyDeduced) + MarkUsedTemplateParameters(SemaRef, Spec->getQualifier(), + OnlyDeduced, Depth, Used); + for (unsigned I = 0, N = Spec->getNumArgs(); I != N; ++I) + MarkUsedTemplateParameters(SemaRef, Spec->getArg(I), OnlyDeduced, Depth, + Used); + break; + } + case Type::TypeOf: if (!OnlyDeduced) MarkUsedTemplateParameters(SemaRef, -- cgit v1.2.3