diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-19 10:56:35 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-19 10:56:35 +0200 |
commit | d6ff3d49df1fbe2731e4ba2076f4faa63ded9b11 (patch) | |
tree | 5c664bb6e8e4c7d90b2825448e764f396d71bdb8 /compilerplugins/clang/unreffun.cxx | |
parent | Add missing icu_headers dependency (diff) | |
download | core-d6ff3d49df1fbe2731e4ba2076f4faa63ded9b11.tar.gz core-d6ff3d49df1fbe2731e4ba2076f4faa63ded9b11.zip |
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
Diffstat (limited to 'compilerplugins/clang/unreffun.cxx')
-rw-r--r-- | compilerplugins/clang/unreffun.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compilerplugins/clang/unreffun.cxx b/compilerplugins/clang/unreffun.cxx index 0284d36ef87c..1dac4d7b276b 100644 --- a/compilerplugins/clang/unreffun.cxx +++ b/compilerplugins/clang/unreffun.cxx @@ -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() |