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/automem.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/automem.cxx')
-rw-r--r-- | compilerplugins/clang/automem.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compilerplugins/clang/automem.cxx b/compilerplugins/clang/automem.cxx index 099c05458e13..92478b9fbb95 100644 --- a/compilerplugins/clang/automem.cxx +++ b/compilerplugins/clang/automem.cxx @@ -13,6 +13,7 @@ #include <iostream> #include <fstream> #include <set> +#include "config_clang.h" #include "plugin.hxx" /** @@ -51,7 +52,7 @@ bool AutoMem::VisitCXXDeleteExpr(const CXXDeleteExpr* expr) { if (ignoreLocation( expr )) return true; - StringRef aFileName = getFilenameOfLocation(compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr))); + StringRef aFileName = getFilenameOfLocation(compiler.getSourceManager().getSpellingLoc(expr->getBeginLoc())); if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/include/salhelper/") || loplugin::hasPathnamePrefix(aFileName, SRCDIR "/include/osl/") || loplugin::hasPathnamePrefix(aFileName, SRCDIR "/salhelper/") @@ -79,7 +80,7 @@ bool AutoMem::VisitCXXDeleteExpr(const CXXDeleteExpr* expr) report( DiagnosticsEngine::Warning, "calling delete on object field, rather use std::unique_ptr or std::scoped_ptr", - compat::getBeginLoc(expr)) + expr->getBeginLoc()) << expr->getSourceRange(); return true; } |