diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-07-29 21:53:49 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-07-29 21:53:49 +0000 |
commit | 6217b80b7a1379b74cced1c076338262c3c980b3 (patch) | |
tree | 771e3d3432ec70a00de34956f44a930a3012bc72 /lib/Sema/SemaTemplateDeduction.cpp | |
parent | f7a0cf426eddae76e1a71dd2295631a2cf0560af (diff) |
Change uses of:
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()
And remove Type::getAsReferenceType(), etc.
This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateDeduction.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp index c71071ee55..7fb159fec7 100644 --- a/lib/Sema/SemaTemplateDeduction.cpp +++ b/lib/Sema/SemaTemplateDeduction.cpp @@ -463,7 +463,7 @@ DeduceTemplateArguments(ASTContext &Context, // T * case Type::Pointer: { - const PointerType *PointerArg = Arg->getAsPointerType(); + const PointerType *PointerArg = Arg->getAs<PointerType>(); if (!PointerArg) return Sema::TDK_NonDeducedMismatch; @@ -476,7 +476,7 @@ DeduceTemplateArguments(ASTContext &Context, // T & case Type::LValueReference: { - const LValueReferenceType *ReferenceArg = Arg->getAsLValueReferenceType(); + const LValueReferenceType *ReferenceArg = Arg->getAs<LValueReferenceType>(); if (!ReferenceArg) return Sema::TDK_NonDeducedMismatch; @@ -488,7 +488,7 @@ DeduceTemplateArguments(ASTContext &Context, // T && [C++0x] case Type::RValueReference: { - const RValueReferenceType *ReferenceArg = Arg->getAsRValueReferenceType(); + const RValueReferenceType *ReferenceArg = Arg->getAs<RValueReferenceType>(); if (!ReferenceArg) return Sema::TDK_NonDeducedMismatch; @@ -681,7 +681,7 @@ DeduceTemplateArguments(ASTContext &Context, Base != BaseEnd; ++Base) { assert(Base->getType()->isRecordType() && "Base class that isn't a record?"); - ToVisit.push_back(Base->getType()->getAsRecordType()); + ToVisit.push_back(Base->getType()->getAs<RecordType>()); } } @@ -1348,7 +1348,7 @@ Sema::DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate, // are ignored for type deduction. if (CanonParamType.getCVRQualifiers()) ParamType = CanonParamType.getUnqualifiedType(); - if (const ReferenceType *ParamRefType = ParamType->getAsReferenceType()) { + if (const ReferenceType *ParamRefType = ParamType->getAs<ReferenceType>()) { // [...] If P is a reference type, the type referred to by P is used // for type deduction. ParamType = ParamRefType->getPointeeType(); @@ -1386,7 +1386,7 @@ Sema::DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate, if (isSimpleTemplateIdType(ParamType) || (isa<PointerType>(ParamType) && isSimpleTemplateIdType( - ParamType->getAsPointerType()->getPointeeType()))) + ParamType->getAs<PointerType>()->getPointeeType()))) TDF |= TDF_DerivedClass; if (TemplateDeductionResult Result |