diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-02-15 15:03:24 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-02-17 21:45:06 +0100 |
commit | d1a2b80b9dc146c7fe63d2657e5506f49d6e5c0d (patch) | |
tree | 7ceeb7e977c660d5b69bc93e8327674b7ea1ae5d /compilerplugins/clang/redundantpointerops.cxx | |
parent | eed401bc7429f29f1b21cf8e3b08969e011d5692 (diff) |
Bump compiler plugins Clang baseline to 12.0.1
...as discussed in the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2020-November/086234.html>
"Bump --enable-compiler-plugins Clang baseline?" (and now picked up again at
<https://lists.freedesktop.org/archives/libreoffice/2022-February/088459.html>
"Re: Bump --enable-compiler-plugins Clang baseline?"), and clean up
compilerplugins/clang/ accordingly
Change-Id: I5e81c6fdcc363aeefd6227606225b526fdf7ac16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129989
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/redundantpointerops.cxx')
-rw-r--r-- | compilerplugins/clang/redundantpointerops.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/compilerplugins/clang/redundantpointerops.cxx b/compilerplugins/clang/redundantpointerops.cxx index 45b0783af0ab..caf6d4741170 100644 --- a/compilerplugins/clang/redundantpointerops.cxx +++ b/compilerplugins/clang/redundantpointerops.cxx @@ -17,7 +17,6 @@ #include <clang/AST/CXXInheritance.h> #include "check.hxx" -#include "compat.hxx" #include "plugin.hxx" /** @@ -68,7 +67,7 @@ bool RedundantPointerOps::VisitMemberExpr(MemberExpr const * memberExpr) { if (ignoreLocation(memberExpr)) return true; - if (compat::getBeginLoc(memberExpr).isMacroID()) + if (memberExpr->getBeginLoc().isMacroID()) return true; auto base = memberExpr->getBase()->IgnoreParenImpCasts(); //parentStmt(parentStmt(memberExpr))->dump(); @@ -80,7 +79,7 @@ bool RedundantPointerOps::VisitMemberExpr(MemberExpr const * memberExpr) report( DiagnosticsEngine::Warning, "'&' followed by '->' operating on %0, rather use '.'", - compat::getBeginLoc(memberExpr)) + memberExpr->getBeginLoc()) << memberExpr->getBase()->getType()->getPointeeType() << memberExpr->getSourceRange(); @@ -91,7 +90,7 @@ bool RedundantPointerOps::VisitMemberExpr(MemberExpr const * memberExpr) report( DiagnosticsEngine::Warning, "'&' followed by '->' operating on %0, rather use '.'", - compat::getBeginLoc(memberExpr)) + memberExpr->getBeginLoc()) << memberExpr->getBase()->getType()->getPointeeType() << memberExpr->getSourceRange(); @@ -106,7 +105,7 @@ bool RedundantPointerOps::VisitMemberExpr(MemberExpr const * memberExpr) report( DiagnosticsEngine::Warning, "'get()' followed by '->' operating on %0, just use '->'", - compat::getBeginLoc(memberExpr)) + memberExpr->getBeginLoc()) << e->IgnoreImpCasts()->getType().getLocalUnqualifiedType() << memberExpr->getSourceRange(); } @@ -131,7 +130,7 @@ bool RedundantPointerOps::VisitUnaryOperator(UnaryOperator const * unaryOperator { if (ignoreLocation(unaryOperator)) return true; - if (compat::getBeginLoc(unaryOperator).isMacroID()) + if (unaryOperator->getBeginLoc().isMacroID()) return true; if (unaryOperator->getOpcode() != UO_Deref) return true; @@ -140,7 +139,7 @@ bool RedundantPointerOps::VisitUnaryOperator(UnaryOperator const * unaryOperator if (innerOp && innerOp->getOpcode() == UO_AddrOf) report( DiagnosticsEngine::Warning, "'&' followed by '*' operating on %0, rather use '.'", - compat::getBeginLoc(unaryOperator)) + unaryOperator->getBeginLoc()) << innerOp->getSubExpr()->getType() << unaryOperator->getSourceRange(); if (auto cxxMemberCallExpr = dyn_cast<CXXMemberCallExpr>(subExpr)) { @@ -152,7 +151,7 @@ bool RedundantPointerOps::VisitUnaryOperator(UnaryOperator const * unaryOperator report( DiagnosticsEngine::Warning, "'*' followed by '.get()' operating on %0, just use '*'", - compat::getBeginLoc(unaryOperator)) + unaryOperator->getBeginLoc()) << e->IgnoreImpCasts()->getType().getLocalUnqualifiedType() << unaryOperator->getSourceRange(); } |