diff options
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 5d22f38770b..74928bcd76a 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -279,9 +279,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(); @@ -430,7 +430,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(); } @@ -991,7 +991,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; } @@ -1419,7 +1419,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* |