diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-03-20 13:29:50 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-03-20 13:29:50 +0100 |
commit | 779f06f9a83185e477e6afe7e31e3705fc22f397 (patch) | |
tree | 2d2e2333c2cecce26b3c6c8e8793e5c9984eec15 /compilerplugins | |
parent | e7404d27face0a3566fec3ddf3f63340d6ba332b (diff) |
Ambiguity between clang:: and llvm::PointerType
Change-Id: I2727ef17b9ab780c608878aaca9ce0fda01b9c22
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/redundantcast.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compilerplugins/clang/redundantcast.cxx b/compilerplugins/clang/redundantcast.cxx index 976e80e5495d..7100b4ef5fd2 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; } |