fix for running externandnotdefined plugin on Ubuntu

Change-Id: I00804b2dd63df44478a14a3eaf2fdcd4e4ce5d09
This commit is contained in:
Noel Grandin
2014-07-28 13:31:05 +02:00
parent a97457db2c
commit 145b0de156

View File

@@ -54,8 +54,7 @@ bool ExternAndNotDefined::VisitFunctionDecl(const FunctionDecl * functionDecl) {
if (functionName == "gdk_x11_screen_get_screen_number") {
return true;
}
SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc(functionDecl->getLocation());
if (!compat::isInMainFile( compiler.getSourceManager(), spellingLocation)) {
if (!compat::isInMainFile( compiler.getSourceManager(), functionDecl->getLocation())) {
return true;
}
StringRef fileName { compiler.getSourceManager().getFilename(functionDecl->getLocation()) };