]> granicus.if.org Git - clang/commitdiff
Kill off the
authorDouglas Gregor <dgregor@apple.com>
Wed, 2 Mar 2011 18:57:38 +0000 (18:57 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 2 Mar 2011 18:57:38 +0000 (18:57 +0000)
TreeTransform::TransformDependentTemplateSpecializationType() with
poor source-location information handling. All of the
CXXScopeSpec::MakeTrivial() and
NestedNameSpecifierLocBuilder::MakeTrivial() callers actually make
sense now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126856 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/TreeTransform.h

index 89fde1f57906d70e9cb0aac2f932c8b35d7c2fb4..b7904cd5638a1f0b56a4e7075cacfd41b5fb9c32 100644 (file)
@@ -500,11 +500,6 @@ public:
                                       DependentTemplateSpecializationTypeLoc TL,
                                                TemplateName Template);
 
-  QualType 
-  TransformDependentTemplateSpecializationType(TypeLocBuilder &TLB,
-                                      DependentTemplateSpecializationTypeLoc TL,
-                                               NestedNameSpecifier *Prefix);
-
   QualType 
   TransformDependentTemplateSpecializationType(TypeLocBuilder &TLB,
                                                DependentTemplateSpecializationTypeLoc TL,
@@ -4451,66 +4446,6 @@ QualType TreeTransform<Derived>::
            .TransformDependentTemplateSpecializationType(TLB, TL, QualifierLoc);
 }
 
-template<typename Derived>
-QualType TreeTransform<Derived>::
-          TransformDependentTemplateSpecializationType(TypeLocBuilder &TLB,
-                                 DependentTemplateSpecializationTypeLoc TL,
-                                                  NestedNameSpecifier *NNS) {
-  // FIXME: This routine needs to go away.
-  const DependentTemplateSpecializationType *T = TL.getTypePtr();
-
-  TemplateArgumentListInfo NewTemplateArgs;
-  NewTemplateArgs.setLAngleLoc(TL.getLAngleLoc());
-  NewTemplateArgs.setRAngleLoc(TL.getRAngleLoc());
-      
-  // FIXME: Nested-name-specifier source location info!
-  typedef TemplateArgumentLocContainerIterator<
-                            DependentTemplateSpecializationTypeLoc> ArgIterator;
-  if (getDerived().TransformTemplateArguments(ArgIterator(TL, 0),
-                                              ArgIterator(TL, TL.getNumArgs()),
-                                              NewTemplateArgs))
-    return QualType();
-
-  CXXScopeSpec SS;
-  SS.MakeTrivial(SemaRef.Context, NNS, 
-                 TL.getQualifierLoc().getSourceRange());
-  QualType Result
-    = getDerived().RebuildDependentTemplateSpecializationType(T->getKeyword(),
-                                        SS.getWithLocInContext(SemaRef.Context),
-                                                            T->getIdentifier(),
-                                                              TL.getNameLoc(),
-                                                              NewTemplateArgs);
-  if (Result.isNull())
-    return QualType();
-
-  if (const ElaboratedType *ElabT = dyn_cast<ElaboratedType>(Result)) {
-    QualType NamedT = ElabT->getNamedType();
-
-    // Copy information relevant to the template specialization.
-    TemplateSpecializationTypeLoc NamedTL
-      = TLB.push<TemplateSpecializationTypeLoc>(NamedT);
-    NamedTL.setLAngleLoc(TL.getLAngleLoc());
-    NamedTL.setRAngleLoc(TL.getRAngleLoc());
-    for (unsigned I = 0, E = TL.getNumArgs(); I != E; ++I)
-      NamedTL.setArgLocInfo(I, TL.getArgLocInfo(I));
-
-    // Copy information relevant to the elaborated type.
-    ElaboratedTypeLoc NewTL = TLB.push<ElaboratedTypeLoc>(Result);
-    NewTL.setKeywordLoc(TL.getKeywordLoc());
-    
-    // FIXME: DependentTemplateSpecializationType needs better source-location
-    // info.
-    NestedNameSpecifierLocBuilder Builder;
-    Builder.MakeTrivial(SemaRef.Context, 
-                        NNS, TL.getQualifierLoc().getSourceRange());
-    NewTL.setQualifierLoc(Builder.getWithLocInContext(SemaRef.Context));
-  } else {
-    TypeLoc NewTL(Result, TL.getOpaqueData());
-    TLB.pushFullCopy(NewTL);
-  }
-  return Result;
-}
-
 template<typename Derived>
 QualType TreeTransform<Derived>::
 TransformDependentTemplateSpecializationType(TypeLocBuilder &TLB,