From: Douglas Gregor Date: Wed, 2 Mar 2011 18:54:26 +0000 (+0000) Subject: Eliminate TreeTransform::RebuildNestedNameSpecifier(), all four of X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d11050fa37c50546dcb795d0cd99ca7384d3929b;p=clang Eliminate TreeTransform::RebuildNestedNameSpecifier(), all four of them, which are no longer used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126855 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index a8468058b2..89fde1f579 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -894,49 +894,6 @@ public: NumExpansions); } - /// \brief Build a new nested-name-specifier given the prefix and an - /// identifier that names the next step in the nested-name-specifier. - /// - /// By default, performs semantic analysis when building the new - /// nested-name-specifier. Subclasses may override this routine to provide - /// different behavior. - NestedNameSpecifier *RebuildNestedNameSpecifier(NestedNameSpecifier *Prefix, - SourceRange Range, - IdentifierInfo &II, - QualType ObjectType, - NamedDecl *FirstQualifierInScope); - - /// \brief Build a new nested-name-specifier given the prefix and the - /// namespace named in the next step in the nested-name-specifier. - /// - /// By default, performs semantic analysis when building the new - /// nested-name-specifier. Subclasses may override this routine to provide - /// different behavior. - NestedNameSpecifier *RebuildNestedNameSpecifier(NestedNameSpecifier *Prefix, - SourceRange Range, - NamespaceDecl *NS); - - /// \brief Build a new nested-name-specifier given the prefix and the - /// namespace alias named in the next step in the nested-name-specifier. - /// - /// By default, performs semantic analysis when building the new - /// nested-name-specifier. Subclasses may override this routine to provide - /// different behavior. - NestedNameSpecifier *RebuildNestedNameSpecifier(NestedNameSpecifier *Prefix, - SourceRange Range, - NamespaceAliasDecl *Alias); - - /// \brief Build a new nested-name-specifier given the prefix and the - /// type named in the next step in the nested-name-specifier. - /// - /// By default, performs semantic analysis when building the new - /// nested-name-specifier. Subclasses may override this routine to provide - /// different behavior. - NestedNameSpecifier *RebuildNestedNameSpecifier(NestedNameSpecifier *Prefix, - SourceRange Range, - bool TemplateKW, - QualType T); - /// \brief Build a new template name given a nested name specifier, a flag /// indicating whether the "template" keyword was provided, and the template /// that the template name refers to. @@ -7758,59 +7715,6 @@ QualType TreeTransform::RebuildTemplateSpecializationType( return SemaRef.CheckTemplateIdType(Template, TemplateNameLoc, TemplateArgs); } -template -NestedNameSpecifier * -TreeTransform::RebuildNestedNameSpecifier(NestedNameSpecifier *Prefix, - SourceRange Range, - IdentifierInfo &II, - QualType ObjectType, - NamedDecl *FirstQualifierInScope) { - CXXScopeSpec SS; - // FIXME: The source location information is all wrong. - SS.MakeTrivial(SemaRef.Context, Prefix, Range); - if (SemaRef.BuildCXXNestedNameSpecifier(0, II, /*FIXME:*/Range.getBegin(), - /*FIXME:*/Range.getEnd(), - ObjectType, false, - SS, FirstQualifierInScope, - false)) - return 0; - - return SS.getScopeRep(); -} - -template -NestedNameSpecifier * -TreeTransform::RebuildNestedNameSpecifier(NestedNameSpecifier *Prefix, - SourceRange Range, - NamespaceDecl *NS) { - return NestedNameSpecifier::Create(SemaRef.Context, Prefix, NS); -} - -template -NestedNameSpecifier * -TreeTransform::RebuildNestedNameSpecifier(NestedNameSpecifier *Prefix, - SourceRange Range, - NamespaceAliasDecl *Alias) { - return NestedNameSpecifier::Create(SemaRef.Context, Prefix, Alias); -} - -template -NestedNameSpecifier * -TreeTransform::RebuildNestedNameSpecifier(NestedNameSpecifier *Prefix, - SourceRange Range, - bool TemplateKW, - QualType T) { - if (T->isDependentType() || T->isRecordType() || - (SemaRef.getLangOptions().CPlusPlus0x && T->isEnumeralType())) { - assert(!T.hasLocalQualifiers() && "Can't get cv-qualifiers here"); - return NestedNameSpecifier::Create(SemaRef.Context, Prefix, TemplateKW, - T.getTypePtr()); - } - - SemaRef.Diag(Range.getBegin(), diag::err_nested_name_spec_non_tag) << T; - return 0; -} - template TemplateName TreeTransform::RebuildTemplateName(CXXScopeSpec &SS,