Kaydet (Commit) 571a63d5 authored tarafından Luboš Luňák's avatar Luboš Luňák Kaydeden (comit) Noel Grandin

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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 99016353
......@@ -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") )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment