summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/typedefparam.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-02-15 15:03:24 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-02-17 21:45:06 +0100
commitd1a2b80b9dc146c7fe63d2657e5506f49d6e5c0d (patch)
tree7ceeb7e977c660d5b69bc93e8327674b7ea1ae5d /compilerplugins/clang/typedefparam.cxx
parenteed401bc7429f29f1b21cf8e3b08969e011d5692 (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/typedefparam.cxx')
-rw-r--r--compilerplugins/clang/typedefparam.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/compilerplugins/clang/typedefparam.cxx b/compilerplugins/clang/typedefparam.cxx
index 7ea4df79d2af..b7e57b2a1b74 100644
--- a/compilerplugins/clang/typedefparam.cxx
+++ b/compilerplugins/clang/typedefparam.cxx
@@ -15,6 +15,8 @@
#include <fstream>
#include <set>
+#include "config_clang.h"
+
#include "check.hxx"
#include "plugin.hxx"
@@ -85,10 +87,10 @@ bool TypedefParam::VisitFunctionDecl(FunctionDecl const* functionDecl)
report(DiagnosticsEngine::Warning,
"function return type at definition site does not match function param at "
"declaration site, %0 vs %1",
- compat::getBeginLoc(functionDecl))
+ functionDecl->getBeginLoc())
<< functionDecl->getReturnType() << canonicalDecl->getReturnType()
<< functionDecl->getSourceRange();
- report(DiagnosticsEngine::Note, "declaration site here", compat::getBeginLoc(canonicalDecl))
+ report(DiagnosticsEngine::Note, "declaration site here", canonicalDecl->getBeginLoc())
<< canonicalDecl->getSourceRange();
}
return true;
@@ -105,7 +107,7 @@ bool TypedefParam::VisitCXXMethodDecl(CXXMethodDecl const* methodDecl)
return true;
StringRef aFileName = getFilenameOfLocation(
- compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(methodDecl)));
+ compiler.getSourceManager().getSpellingLoc(methodDecl->getBeginLoc()));
// seems to be using typedefs as a form of documentation for method params
if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/sw/source/filter/ww8/ww8scan.hxx"))
return true;
@@ -145,11 +147,11 @@ bool TypedefParam::VisitCXXMethodDecl(CXXMethodDecl const* methodDecl)
report(DiagnosticsEngine::Warning,
"method return type does not match overridden method "
"%0 vs %1",
- compat::getBeginLoc(methodDecl))
+ methodDecl->getBeginLoc())
<< methodDecl->getReturnType() << superMethodDecl->getReturnType()
<< methodDecl->getSourceRange();
report(DiagnosticsEngine::Note, "super-class method here",
- compat::getBeginLoc(superMethodDecl))
+ superMethodDecl->getBeginLoc())
<< superMethodDecl->getSourceRange();
}
}