From 145b0de1569229c797084040caa2386c8cf1ee4e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 28 Jul 2014 13:31:05 +0200 Subject: fix for running externandnotdefined plugin on Ubuntu Change-Id: I00804b2dd63df44478a14a3eaf2fdcd4e4ce5d09 --- compilerplugins/clang/externandnotdefined.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compilerplugins/clang/externandnotdefined.cxx') diff --git a/compilerplugins/clang/externandnotdefined.cxx b/compilerplugins/clang/externandnotdefined.cxx index e66247fa1fad..2deca8adadcf 100644 --- a/compilerplugins/clang/externandnotdefined.cxx +++ b/compilerplugins/clang/externandnotdefined.cxx @@ -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()) }; -- cgit