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

@@ -166,8 +166,7 @@ bool Plugin::isInUnoIncludeFile(SourceLocation spellingLocation) const {
|| name.startswith(SRCDIR "/include/salhelper/") || name.startswith(SRCDIR "/include/salhelper/")
|| name.startswith(SRCDIR "/include/systools/") || name.startswith(SRCDIR "/include/systools/")
|| name.startswith(SRCDIR "/include/typelib/") || name.startswith(SRCDIR "/include/typelib/")
|| name.startswith(SRCDIR "/include/uno/") || name.startswith(SRCDIR "/include/uno/"));
|| name.startswith(WORKDIR "/"));
} }
bool Plugin::isInUnoIncludeFile(const FunctionDecl* functionDecl) const { bool Plugin::isInUnoIncludeFile(const FunctionDecl* functionDecl) const {

View File

@@ -133,6 +133,14 @@ bool UnrefFun::VisitFunctionDecl(FunctionDecl const * decl) {
{ {
return true; 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( report(
DiagnosticsEngine::Warning, DiagnosticsEngine::Warning,
(canon->isDefined() (canon->isDefined()

View File

@@ -116,8 +116,8 @@ uno::Reference<text::XTextContent> ScAnnotationShapeObj::getTextContent()
CPPUNIT_TEST_SUITE_REGISTRATION(ScAnnotationShapeObj); CPPUNIT_TEST_SUITE_REGISTRATION(ScAnnotationShapeObj);
CPPUNIT_PLUGIN_IMPLEMENT();
} }
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */