diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/ASTContext.cpp | 32 | ||||
-rw-r--r-- | lib/AST/ASTImporter.cpp | 8 | ||||
-rw-r--r-- | lib/AST/Type.cpp | 2 | ||||
-rw-r--r-- | lib/AST/TypePrinter.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/Mangle.cpp | 4 | ||||
-rw-r--r-- | lib/Frontend/PCHReader.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/PCHWriter.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 6 | ||||
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 22 | ||||
-rw-r--r-- | lib/Sema/SemaTemplateDeduction.cpp | 6 | ||||
-rw-r--r-- | lib/Sema/SemaType.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/TreeTransform.h | 20 |
12 files changed, 54 insertions, 54 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 2b88a6cd9f..7fce55b9df 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -1962,7 +1962,7 @@ ASTContext::getQualifiedNameType(NestedNameSpecifier *NNS, return QualType(T, 0); } -QualType ASTContext::getTypenameType(NestedNameSpecifier *NNS, +QualType ASTContext::getDependentNameType(NestedNameSpecifier *NNS, const IdentifierInfo *Name, QualType Canon) { assert(NNS->isDependent() && "nested-name-specifier must be dependent"); @@ -1970,36 +1970,36 @@ QualType ASTContext::getTypenameType(NestedNameSpecifier *NNS, if (Canon.isNull()) { NestedNameSpecifier *CanonNNS = getCanonicalNestedNameSpecifier(NNS); if (CanonNNS != NNS) - Canon = getTypenameType(CanonNNS, Name); + Canon = getDependentNameType(CanonNNS, Name); } llvm::FoldingSetNodeID ID; - TypenameType::Profile(ID, NNS, Name); + DependentNameType::Profile(ID, NNS, Name); void *InsertPos = 0; - TypenameType *T - = TypenameTypes.FindNodeOrInsertPos(ID, InsertPos); + DependentNameType *T + = DependentNameTypes.FindNodeOrInsertPos(ID, InsertPos); if (T) return QualType(T, 0); - T = new (*this) TypenameType(NNS, Name, Canon); + T = new (*this) DependentNameType(NNS, Name, Canon); Types.push_back(T); - TypenameTypes.InsertNode(T, InsertPos); + DependentNameTypes.InsertNode(T, InsertPos); return QualType(T, 0); } QualType -ASTContext::getTypenameType(NestedNameSpecifier *NNS, +ASTContext::getDependentNameType(NestedNameSpecifier *NNS, const TemplateSpecializationType *TemplateId, QualType Canon) { assert(NNS->isDependent() && "nested-name-specifier must be dependent"); llvm::FoldingSetNodeID ID; - TypenameType::Profile(ID, NNS, TemplateId); + DependentNameType::Profile(ID, NNS, TemplateId); void *InsertPos = 0; - TypenameType *T - = TypenameTypes.FindNodeOrInsertPos(ID, InsertPos); + DependentNameType *T + = DependentNameTypes.FindNodeOrInsertPos(ID, InsertPos); if (T) return QualType(T, 0); @@ -2011,17 +2011,17 @@ ASTContext::getTypenameType(NestedNameSpecifier *NNS, = CanonType->getAs<TemplateSpecializationType>(); assert(CanonTemplateId && "Canonical type must also be a template specialization type"); - Canon = getTypenameType(CanonNNS, CanonTemplateId); + Canon = getDependentNameType(CanonNNS, CanonTemplateId); } - TypenameType *CheckT - = TypenameTypes.FindNodeOrInsertPos(ID, InsertPos); + DependentNameType *CheckT + = DependentNameTypes.FindNodeOrInsertPos(ID, InsertPos); assert(!CheckT && "Typename canonical type is broken"); (void)CheckT; } - T = new (*this) TypenameType(NNS, TemplateId, Canon); + T = new (*this) DependentNameType(NNS, TemplateId, Canon); Types.push_back(T); - TypenameTypes.InsertNode(T, InsertPos); + DependentNameTypes.InsertNode(T, InsertPos); return QualType(T, 0); } diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index 9e789bb554..75cf1380a1 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -73,7 +73,7 @@ namespace { // FIXME: SubstTemplateTypeParmType // FIXME: TemplateSpecializationType QualType VisitQualifiedNameType(QualifiedNameType *T); - // FIXME: TypenameType + // FIXME: DependentNameType QualType VisitObjCInterfaceType(ObjCInterfaceType *T); QualType VisitObjCObjectPointerType(ObjCObjectPointerType *T); @@ -618,9 +618,9 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, break; } - case Type::Typename: { - const TypenameType *Typename1 = cast<TypenameType>(T1); - const TypenameType *Typename2 = cast<TypenameType>(T2); + case Type::DependentName: { + const DependentNameType *Typename1 = cast<DependentNameType>(T1); + const DependentNameType *Typename2 = cast<DependentNameType>(T2); if (!IsStructurallyEquivalent(Context, Typename1->getQualifier(), Typename2->getQualifier())) diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 4e24de1922..a18cd0fbca 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -757,7 +757,7 @@ bool Type::isSpecifierType() const { case SubstTemplateTypeParm: case TemplateSpecialization: case QualifiedName: - case Typename: + case DependentName: case ObjCInterface: case ObjCObjectPointer: case Elaborated: diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp index 85e23d60ba..da0ac3f5ae 100644 --- a/lib/AST/TypePrinter.cpp +++ b/lib/AST/TypePrinter.cpp @@ -567,7 +567,7 @@ void TypePrinter::PrintQualifiedName(const QualifiedNameType *T, S = MyString + ' ' + S; } -void TypePrinter::PrintTypename(const TypenameType *T, std::string &S) { +void TypePrinter::PrintDependentName(const DependentNameType *T, std::string &S) { std::string MyString; { diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index 9fdb12e15e..af5e5d3c78 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -1164,7 +1164,7 @@ void CXXNameMangler::mangleType(const TemplateSpecializationType *T) { mangleName(TD, T->getArgs(), T->getNumArgs()); } -void CXXNameMangler::mangleType(const TypenameType *T) { +void CXXNameMangler::mangleType(const DependentNameType *T) { // Typename types are always nested Out << 'N'; mangleUnresolvedScope(T->getQualifier()); @@ -1456,7 +1456,7 @@ void CXXNameMangler::mangleExpression(const Expr *E) { // It isn't clear that we ever actually want to have such a // nested-name-specifier; why not just represent it as a typename type? if (!QTy && NNS->getAsIdentifier() && NNS->getPrefix()) { - QTy = getASTContext().getTypenameType(NNS->getPrefix(), + QTy = getASTContext().getDependentNameType(NNS->getPrefix(), NNS->getAsIdentifier()) .getTypePtr(); } diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index 579f827e16..6d39952e9d 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -2351,7 +2351,7 @@ void TypeLocReader::VisitQualifiedNameTypeLoc(QualifiedNameTypeLoc TL) { void TypeLocReader::VisitInjectedClassNameTypeLoc(InjectedClassNameTypeLoc TL) { TL.setNameLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); } -void TypeLocReader::VisitTypenameTypeLoc(TypenameTypeLoc TL) { +void TypeLocReader::VisitDependentNameTypeLoc(DependentNameTypeLoc TL) { TL.setNameLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); } void TypeLocReader::VisitObjCInterfaceTypeLoc(ObjCInterfaceTypeLoc TL) { diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp index 5086b488f6..4dd8dc36b7 100644 --- a/lib/Frontend/PCHWriter.cpp +++ b/lib/Frontend/PCHWriter.cpp @@ -406,7 +406,7 @@ void TypeLocWriter::VisitQualifiedNameTypeLoc(QualifiedNameTypeLoc TL) { void TypeLocWriter::VisitInjectedClassNameTypeLoc(InjectedClassNameTypeLoc TL) { Writer.AddSourceLocation(TL.getNameLoc(), Record); } -void TypeLocWriter::VisitTypenameTypeLoc(TypenameTypeLoc TL) { +void TypeLocWriter::VisitDependentNameTypeLoc(DependentNameTypeLoc TL) { Writer.AddSourceLocation(TL.getNameLoc(), Record); } void TypeLocWriter::VisitObjCInterfaceTypeLoc(ObjCInterfaceTypeLoc TL) { diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index b8158bb7a0..4aa16c7d35 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -88,8 +88,8 @@ Sema::TypeTy *Sema::getTypeName(IdentifierInfo &II, SourceLocation NameLoc, return 0; // We know from the grammar that this name refers to a type, so build a - // TypenameType node to describe the type. - // FIXME: Record somewhere that this TypenameType node has no "typename" + // DependentNameType node to describe the type. + // FIXME: Record somewhere that this DependentNameType node has no "typename" // keyword associated with it. return CheckTypenameType((NestedNameSpecifier *)SS->getScopeRep(), II, SS->getRange()).getAsOpaquePtr(); @@ -198,7 +198,7 @@ Sema::TypeTy *Sema::getTypeName(IdentifierInfo &II, SourceLocation NameLoc, } else if (UnresolvedUsingTypenameDecl *UUDecl = dyn_cast<UnresolvedUsingTypenameDecl>(IIDecl)) { // FIXME: preserve source structure information. - T = Context.getTypenameType(UUDecl->getTargetNestedNameSpecifier(), &II); + T = Context.getDependentNameType(UUDecl->getTargetNestedNameSpecifier(), &II); } else { // If it's not plausibly a type, suppress diagnostics. Result.suppressDiagnostics(); diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 4507e64868..2e64a6c332 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -4962,7 +4962,7 @@ Sema::ActOnTypenameType(SourceLocation TypenameLoc, const CXXScopeSpec &SS, return Context.getQualifiedNameType(NNS, T).getAsOpaquePtr(); } - return Context.getTypenameType(NNS, TemplateId).getAsOpaquePtr(); + return Context.getDependentNameType(NNS, TemplateId).getAsOpaquePtr(); } /// \brief Build the type that describes a C++ typename specifier, @@ -4977,7 +4977,7 @@ Sema::CheckTypenameType(NestedNameSpecifier *NNS, const IdentifierInfo &II, // If the nested-name-specifier does not refer to the current // instantiation, then build a typename type. if (!CurrentInstantiation) - return Context.getTypenameType(NNS, &II); + return Context.getDependentNameType(NNS, &II); // The nested-name-specifier refers to the current instantiation, so the // "typename" keyword itself is superfluous. In C++03, the program is @@ -5013,7 +5013,7 @@ Sema::CheckTypenameType(NestedNameSpecifier *NNS, const IdentifierInfo &II, case LookupResult::NotFoundInCurrentInstantiation: // Okay, it's a member of an unknown instantiation. - return Context.getTypenameType(NNS, &II); + return Context.getDependentNameType(NNS, &II); case LookupResult::Found: if (TypeDecl *Type = dyn_cast<TypeDecl>(Result.getFoundDecl())) { @@ -5098,16 +5098,16 @@ 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 TransformDependentNameType(TypeLocBuilder &TLB, DependentNameTypeLoc TL, QualType ObjectType); }; } QualType -CurrentInstantiationRebuilder::TransformTypenameType(TypeLocBuilder &TLB, - TypenameTypeLoc TL, +CurrentInstantiationRebuilder::TransformDependentNameType(TypeLocBuilder &TLB, + DependentNameTypeLoc TL, QualType ObjectType) { - TypenameType *T = TL.getTypePtr(); + DependentNameType *T = TL.getTypePtr(); NestedNameSpecifier *NNS = TransformNestedNameSpecifier(T->getQualifier(), @@ -5139,15 +5139,15 @@ CurrentInstantiationRebuilder::TransformTypenameType(TypeLocBuilder &TLB, NewTemplateId == QualType(TemplateId, 0)) Result = QualType(T, 0); else - Result = getDerived().RebuildTypenameType(NNS, NewTemplateId); + Result = getDerived().RebuildDependentNameType(NNS, NewTemplateId); } else - Result = getDerived().RebuildTypenameType(NNS, T->getIdentifier(), + Result = getDerived().RebuildDependentNameType(NNS, T->getIdentifier(), SourceRange(TL.getNameLoc())); if (Result.isNull()) return QualType(); - TypenameTypeLoc NewTL = TLB.push<TypenameTypeLoc>(Result); + DependentNameTypeLoc NewTL = TLB.push<DependentNameTypeLoc>(Result); NewTL.setNameLoc(TL.getNameLoc()); return Result; } @@ -5172,7 +5172,7 @@ CurrentInstantiationRebuilder::TransformTypenameType(TypeLocBuilder &TLB, /// typename X<T>::pointer X<T>::data() { ... } /// \endcode /// -/// Here, the type "typename X<T>::pointer" will be created as a TypenameType, +/// Here, the type "typename X<T>::pointer" will be created as a DependentNameType, /// since we do not know that we can look into X<T> when we parsed the type. /// This function will rebuild the type, performing the lookup of "pointer" /// in X<T> and returning a QualifiedNameType whose canonical type is the same diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp index 31a642fd05..d61a767dc5 100644 --- a/lib/Sema/SemaTemplateDeduction.cpp +++ b/lib/Sema/SemaTemplateDeduction.cpp @@ -773,7 +773,7 @@ DeduceTemplateArguments(Sema &S, case Type::TypeOfExpr: case Type::TypeOf: - case Type::Typename: + case Type::DependentName: // No template argument deduction for these types return Sema::TDK_Success; @@ -2555,10 +2555,10 @@ MarkUsedTemplateParameters(Sema &SemaRef, QualType T, OnlyDeduced, Depth, Used); break; - case Type::Typename: + case Type::DependentName: if (!OnlyDeduced) MarkUsedTemplateParameters(SemaRef, - cast<TypenameType>(T)->getQualifier(), + cast<DependentNameType>(T)->getQualifier(), OnlyDeduced, Depth, Used); break; diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 2c6cc7fc9d..cc6b7a8219 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1262,7 +1262,7 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S, NestedNameSpecifier *NNSPrefix = NNS->getPrefix(); switch (NNS->getKind()) { case NestedNameSpecifier::Identifier: - ClsType = Context.getTypenameType(NNSPrefix, NNS->getAsIdentifier()); + ClsType = Context.getDependentNameType(NNSPrefix, NNS->getAsIdentifier()); break; case NestedNameSpecifier::Namespace: diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index c7ea17fde6..5d3f21e4e8 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -537,15 +537,15 @@ public: /// \brief Build a new typename type that refers to a template-id. /// - /// By default, builds a new TypenameType type from the nested-name-specifier + /// By default, builds a new DependentNameType type from the nested-name-specifier /// and the given type. Subclasses may override this routine to provide /// different behavior. - QualType RebuildTypenameType(NestedNameSpecifier *NNS, QualType T) { + QualType RebuildDependentNameType(NestedNameSpecifier *NNS, QualType T) { if (NNS->isDependent()) { CXXScopeSpec SS; SS.setScopeRep(NNS); if (!SemaRef.computeDeclContext(SS)) - return SemaRef.Context.getTypenameType(NNS, + return SemaRef.Context.getDependentNameType(NNS, cast<TemplateSpecializationType>(T)); } @@ -557,7 +557,7 @@ public: /// By default, performs semantic analysis when building the typename type /// (or qualified name type). Subclasses may override this routine to provide /// different behavior. - QualType RebuildTypenameType(NestedNameSpecifier *NNS, + QualType RebuildDependentNameType(NestedNameSpecifier *NNS, const IdentifierInfo *Id, SourceRange SR) { return SemaRef.CheckTypenameType(NNS, *Id, SR); @@ -2996,10 +2996,10 @@ TreeTransform<Derived>::TransformQualifiedNameType(TypeLocBuilder &TLB, } template<typename Derived> -QualType TreeTransform<Derived>::TransformTypenameType(TypeLocBuilder &TLB, - TypenameTypeLoc TL, +QualType TreeTransform<Derived>::TransformDependentNameType(TypeLocBuilder &TLB, + DependentNameTypeLoc TL, QualType ObjectType) { - TypenameType *T = TL.getTypePtr(); + DependentNameType *T = TL.getTypePtr(); /* FIXME: preserve source information better than this */ SourceRange SR(TL.getNameLoc()); @@ -3023,14 +3023,14 @@ QualType TreeTransform<Derived>::TransformTypenameType(TypeLocBuilder &TLB, NewTemplateId == QualType(TemplateId, 0)) return QualType(T, 0); - Result = getDerived().RebuildTypenameType(NNS, NewTemplateId); + Result = getDerived().RebuildDependentNameType(NNS, NewTemplateId); } else { - Result = getDerived().RebuildTypenameType(NNS, T->getIdentifier(), SR); + Result = getDerived().RebuildDependentNameType(NNS, T->getIdentifier(), SR); } if (Result.isNull()) return QualType(); - TypenameTypeLoc NewTL = TLB.push<TypenameTypeLoc>(Result); + DependentNameTypeLoc NewTL = TLB.push<DependentNameTypeLoc>(Result); NewTL.setNameLoc(TL.getNameLoc()); return Result; |