diff options
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 79ebb546d07..842caa8d00a 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -288,9 +288,9 @@ unsigned CallExpr::isBuiltinCall(ASTContext &Context) const { QualType CallExpr::getCallReturnType() const { QualType CalleeType = getCallee()->getType(); - if (const PointerType *FnTypePtr = CalleeType->getAsPointerType()) + if (const PointerType *FnTypePtr = CalleeType->getAs<PointerType>()) CalleeType = FnTypePtr->getPointeeType(); - else if (const BlockPointerType *BPT = CalleeType->getAsBlockPointerType()) + else if (const BlockPointerType *BPT = CalleeType->getAs<BlockPointerType>()) CalleeType = BPT->getPointeeType(); const FunctionType *FnType = CalleeType->getAsFunctionType(); @@ -439,7 +439,7 @@ Expr *InitListExpr::updateInit(unsigned Init, Expr *expr) { /// getFunctionType - Return the underlying function type for this block. /// const FunctionType *BlockExpr::getFunctionType() const { - return getType()->getAsBlockPointerType()-> + return getType()->getAs<BlockPointerType>()-> getPointeeType()->getAsFunctionType(); } @@ -923,7 +923,7 @@ Expr::isModifiableLvalue(ASTContext &Ctx, SourceLocation *Loc) const { if (CT->isIncompleteType()) return MLV_IncompleteType; - if (const RecordType *r = CT->getAsRecordType()) { + if (const RecordType *r = CT->getAs<RecordType>()) { if (r->hasConstFields()) return MLV_ConstQualified; } @@ -999,7 +999,7 @@ bool Expr::isOBJCGCCandidate(ASTContext &Ctx) const { QualType T = VD->getType(); // dereferencing to an object pointer is always a gc'able candidate if (T->isPointerType() && - T->getAsPointerType()->getPointeeType()->isObjCObjectPointerType()) + T->getAs<PointerType>()->getPointeeType()->isObjCObjectPointerType()) return true; } @@ -1427,7 +1427,7 @@ bool Expr::isNullPointerConstant(ASTContext &Ctx) const if (const ExplicitCastExpr *CE = dyn_cast<ExplicitCastExpr>(this)) { if (!Ctx.getLangOptions().CPlusPlus) { // Check that it is a cast to void*. - if (const PointerType *PT = CE->getType()->getAsPointerType()) { + if (const PointerType *PT = CE->getType()->getAs<PointerType>()) { QualType Pointee = PT->getPointeeType(); if (Pointee.getCVRQualifiers() == 0 && Pointee->isVoidType() && // to void* |