compilerplugins/clang/redundantcast.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
New commits: commit 779f06f9a83185e477e6afe7e31e3705fc22f397 Author: Stephan Bergmann <sberg...@redhat.com> Date: Sun Mar 20 13:29:50 2016 +0100 Ambiguity between clang:: and llvm::PointerType Change-Id: I2727ef17b9ab780c608878aaca9ce0fda01b9c22 diff --git a/compilerplugins/clang/redundantcast.cxx b/compilerplugins/clang/redundantcast.cxx index 976e80e..7100b4e 100644 --- a/compilerplugins/clang/redundantcast.cxx +++ b/compilerplugins/clang/redundantcast.cxx @@ -32,7 +32,7 @@ namespace { bool isVoidPointer(QualType type) { return type->isPointerType() - && type->getAs<PointerType>()->getPointeeType()->isVoidType(); + && type->getAs<clang::PointerType>()->getPointeeType()->isVoidType(); } class RedundantCast: @@ -120,10 +120,10 @@ bool RedundantCast::VisitImplicitCastExpr(const ImplicitCastExpr * expr) { Expr const * e = expr->getSubExpr()->IgnoreParenImpCasts(); while (isa<CXXConstCastExpr>(e)) { auto cc = dyn_cast<CXXConstCastExpr>(e); - if (expr->getType()->getAs<PointerType>()->getPointeeType() - .isAtLeastAsQualifiedAs( + if (expr->getType()->getAs<clang::PointerType>() + ->getPointeeType().isAtLeastAsQualifiedAs( cc->getSubExpr()->getType() - ->getAs<PointerType>()->getPointeeType())) + ->getAs<clang::PointerType>()->getPointeeType())) { report( DiagnosticsEngine::Warning, @@ -164,10 +164,10 @@ bool RedundantCast::VisitImplicitCastExpr(const ImplicitCastExpr * expr) { Expr const * e = expr->getSubExpr()->IgnoreParenImpCasts(); while (isa<CXXConstCastExpr>(e)) { auto cc = dyn_cast<CXXConstCastExpr>(e); - if (expr->getType()->getAs<PointerType>()->getPointeeType() - .isAtLeastAsQualifiedAs( + if (expr->getType()->getAs<clang::PointerType>() + ->getPointeeType().isAtLeastAsQualifiedAs( cc->getSubExpr()->getType() - ->getAs<PointerType>()->getPointeeType())) + ->getAs<clang::PointerType>()->getPointeeType())) { report( DiagnosticsEngine::Warning, @@ -213,7 +213,7 @@ bool RedundantCast::VisitCXXReinterpretCastExpr( return true; } if (expr->getSubExpr()->getType()->isVoidPointerType()) { - auto t = expr->getType()->getAs<PointerType>(); + auto t = expr->getType()->getAs<clang::PointerType>(); if (t == nullptr || !t->getPointeeType()->isObjectType()) { return true; } @@ -250,7 +250,7 @@ bool RedundantCast::VisitCXXReinterpretCastExpr( << expr->getSubExprAsWritten()->getType() << expr->getType() << expr->getSourceRange(); } else if (expr->getType()->isVoidPointerType()) { - auto t = expr->getSubExpr()->getType()->getAs<PointerType>(); + auto t = expr->getSubExpr()->getType()->getAs<clang::PointerType>(); if (t == nullptr || !t->getPointeeType()->isObjectType()) { return true; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits