summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/pluginhandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/pluginhandler.cxx')
-rw-r--r--compilerplugins/clang/pluginhandler.cxx5
1 files changed, 4 insertions, 1 deletions
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") )