[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Mar 11 10:54:50 UTC 2019


 compilerplugins/clang/blockblock.cxx    |    4 ++--
 compilerplugins/clang/pluginhandler.cxx |    5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 67dd4dcbfc203d74b00f577a4e34c0a36e3cbe20
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Tue Mar 5 16:07:44 2019 +0100
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Mar 11 11:54:40 2019 +0100

    blockblock clang plugin does not do rewriting
    
    Change-Id: Iee879980d8dbaa4cdbdf8f4f5859236367f30ccb
    Reviewed-on: https://gerrit.libreoffice.org/68871
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/blockblock.cxx b/compilerplugins/clang/blockblock.cxx
index 6c9ef887cf10..9358845abc47 100644
--- a/compilerplugins/clang/blockblock.cxx
+++ b/compilerplugins/clang/blockblock.cxx
@@ -20,11 +20,11 @@
 namespace {
 
 class BlockBlock:
-    public loplugin::FilteringRewritePlugin<BlockBlock>
+    public loplugin::FilteringPlugin<BlockBlock>
 {
 public:
     explicit BlockBlock(loplugin::InstantiationData const & data):
-        FilteringRewritePlugin(data) {}
+        FilteringPlugin(data) {}
 
     virtual void run() override
     {
commit 571a63d5591aa6a9bbf7cdc1fc7c8d2824411d2d
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Sun Feb 24 17:46:22 2019 +0100
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Mar 11 11:54:25 2019 +0100

    avoid a possible crash in loplugin's ignoreLocation()
    
    For the built-in(?) __int128_t there's apparently no valid presumed location.
    
    Change-Id: I1b2f1a827bc914d2f288dd1e02718bf45a50dd1e
    Reviewed-on: https://gerrit.libreoffice.org/68870
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/pluginhandler.cxx b/compilerplugins/clang/pluginhandler.cxx
index 5a31368bdee0..540e58dcd222 100644
--- a/compilerplugins/clang/pluginhandler.cxx
+++ b/compilerplugins/clang/pluginhandler.cxx
@@ -204,7 +204,10 @@ bool PluginHandler::checkIgnoreLocation(SourceLocation loc)
     SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( loc );
     if( compiler.getSourceManager().isInSystemHeader( expansionLoc ))
         return true;
-    const char* bufferName = compiler.getSourceManager().getPresumedLoc( expansionLoc ).getFilename();
+    PresumedLoc presumedLoc = compiler.getSourceManager().getPresumedLoc( expansionLoc );
+    if( presumedLoc.isInvalid())
+        return true;
+    const char* bufferName = presumedLoc.getFilename();
     if (bufferName == NULL
         || hasPathnamePrefix(bufferName, SRCDIR "/external/")
         || isSamePathname(bufferName, SRCDIR "/sdext/source/pdfimport/wrapper/keyword_list") )


More information about the Libreoffice-commits mailing list