Plugin::isInUnoIncludeFile should not cover WORKDIR

...that got in, for no apparent reason, when various, slightly different
implementations of isInUnoIncludeFile got consolidated into one.

Change-Id: I64a9eb62703d57a0b7b57720ec9f251ffa780691
This commit is contained in:
Stephan Bergmann
2016-10-19 10:56:35 +02:00
parent 66b3aa76b1
commit d6ff3d49df
3 changed files with 11 additions and 4 deletions

View File

@@ -133,6 +133,14 @@ bool UnrefFun::VisitFunctionDecl(FunctionDecl const * decl) {
{
return true;
}
auto loc = decl->getLocation();
if (compiler.getSourceManager().isMacroBodyExpansion(loc)
&& (Lexer::getImmediateMacroName(
loc, compiler.getSourceManager(), compiler.getLangOpts())
== "MDDS_MTV_DEFINE_ELEMENT_CALLBACKS"))
{
return true;
}
report(
DiagnosticsEngine::Warning,
(canon->isDefined()