diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Analysis/RegionStore.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Analysis/VLASizeChecker.cpp | 3 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaType.cpp | 2 |
6 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp index dbf8c42d273..45c42281ab2 100644 --- a/clang/lib/Analysis/RegionStore.cpp +++ b/clang/lib/Analysis/RegionStore.cpp @@ -1109,7 +1109,7 @@ SVal RegionStoreManager::RetrieveElement(const GRState* state, // FIXME: Handle loads from strings where the literal is treated as // an integer, e.g., *((unsigned int*)"hello") ASTContext &Ctx = getContext(); - QualType T = StrR->getValueType(Ctx)->getAs<ArrayType>()->getElementType(); + QualType T = Ctx.getAsArrayType(StrR->getValueType(Ctx))->getElementType(); if (T != Ctx.getCanonicalType(R->getElementType())) return UnknownVal(); diff --git a/clang/lib/Analysis/VLASizeChecker.cpp b/clang/lib/Analysis/VLASizeChecker.cpp index 98b755be53d..5cb700ed67b 100644 --- a/clang/lib/Analysis/VLASizeChecker.cpp +++ b/clang/lib/Analysis/VLASizeChecker.cpp @@ -43,7 +43,8 @@ void VLASizeChecker::PreVisitDeclStmt(CheckerContext &C, const DeclStmt *DS) { if (!VD) return; - const VariableArrayType *VLA = VD->getType()->getAs<VariableArrayType>(); + const VariableArrayType *VLA + = C.getASTContext().getAsVariableArrayType(VD->getType()); if (!VLA) return; diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 2021ced3168..2a28ef08a08 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -507,7 +507,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) { // Handle CXX destruction of variables. QualType DtorTy(Ty); - if (const ArrayType *Array = DtorTy->getAs<ArrayType>()) + while (const ArrayType *Array = getContext().getAsArrayType(DtorTy)) DtorTy = getContext().getBaseElementType(Array); if (const RecordType *RT = DtorTy->getAs<RecordType>()) if (CXXRecordDecl *ClassDecl = dyn_cast<CXXRecordDecl>(RT->getDecl())) { diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index cfea66bf5af..8bd934a561f 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -3596,7 +3596,7 @@ Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS, // template <typename... Args> void f(Args... args) { // int vals[] = { args }; // } - const IncompleteArrayType *IAT = T->getAs<IncompleteArrayType>(); + const IncompleteArrayType *IAT = Context.getAsIncompleteArrayType(T); Expr *Init = IDecl->getInit(); if (IAT && Init && (Init->isTypeDependent() || Init->isValueDependent())) { diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 69dac7d33e0..69e5a523070 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -2982,7 +2982,7 @@ BuiltinCandidateTypeSet::AddPointerWithMoreQualifiedTypeVariants(QualType Ty, QualType PointeeTy = PointerTy->getPointeeType(); unsigned BaseCVR = PointeeTy.getCVRQualifiers(); - if (const ConstantArrayType *Array = PointeeTy->getAs<ConstantArrayType>()) + if (const ConstantArrayType *Array =Context.getAsConstantArrayType(PointeeTy)) BaseCVR = Array->getElementType().getCVRQualifiers(); bool hasVolatile = VisibleQuals.hasVolatile(); bool hasRestrict = VisibleQuals.hasRestrict(); diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 93ef1ea2ead..00dc809f51a 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -1704,7 +1704,7 @@ bool Sema::RequireCompleteType(SourceLocation Loc, QualType T, // class template specialization, or an array with known size of such, // try to instantiate it. QualType MaybeTemplate = T; - if (const ConstantArrayType *Array = T->getAs<ConstantArrayType>()) + if (const ConstantArrayType *Array = Context.getAsConstantArrayType(T)) MaybeTemplate = Array->getElementType(); if (const RecordType *Record = MaybeTemplate->getAs<RecordType>()) { if (ClassTemplateSpecializationDecl *ClassTemplateSpec |