summaryrefslogtreecommitdiff
path: root/compilerplugins/clang
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r--compilerplugins/clang/store/constantfunction.cxx28
1 files changed, 27 insertions, 1 deletions
diff --git a/compilerplugins/clang/store/constantfunction.cxx b/compilerplugins/clang/store/constantfunction.cxx
index c2a4fef2bfe9..74fc0f4669b3 100644
--- a/compilerplugins/clang/store/constantfunction.cxx
+++ b/compilerplugins/clang/store/constantfunction.cxx
@@ -54,6 +54,18 @@ public:
if (strstr(compiler.getSourceManager().getFileEntryForID(mainFileID)->getDir()->getName(), "sc/source/core/tool") != 0) {
return;
}
+ if (strstr(compiler.getSourceManager().getFileEntryForID(mainFileID)->getDir()->getName(), "sc/source/core/tool") != 0) {
+ return;
+ }
+ if (strstr(compiler.getSourceManager().getFileEntryForID(mainFileID)->getDir()->getName(), "desktop/source/lib") != 0) {
+ return;
+ }
+ if (strstr(compiler.getSourceManager().getFileEntryForID(mainFileID)->getName(), "bootstrapfixture.cxx") != 0) {
+ return;
+ }
+ if (strstr(compiler.getSourceManager().getFileEntryForID(mainFileID)->getName(), "gtk3gtkinst.cxx") != 0) {
+ return;
+ }
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
}
@@ -136,6 +148,14 @@ bool ConstantFunction::VisitFunctionDecl(const FunctionDecl * pFunctionDecl) {
if (getFilename(pFunctionDecl->getCanonicalDecl()->getLocStart()) == SRCDIR "/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx") {
return true;
}
+ // this test just test the include of some headers
+ if (aFileName == SRCDIR "/officecfg/qa/cppheader.cxx") {
+ return true;
+ }
+ // just ignore this for now, people furiously hacking in there
+ if (startsWith(aFileName, SRCDIR "/libreofficekit")) {
+ return true;
+ }
const CXXMethodDecl *pCXXMethodDecl = dyn_cast<CXXMethodDecl>(pFunctionDecl);
@@ -417,13 +437,19 @@ bool ConstantFunction::VisitFunctionDecl(const FunctionDecl * pFunctionDecl) {
|| aFunctionName == "framework::MenuBarManager::Highlight") {
return true;
}
+ if (aFunctionName == "sc::AlignedAllocator::operator!=") {
+ return true;
+ }
+ if (aFunctionName == "clipboard_owner_init") {
+ return true;
+ }
std::string aImmediateMacro = "";
if (compat::isMacroBodyExpansion(compiler, pFunctionDecl->getLocStart()) ) {
StringRef name { Lexer::getImmediateMacroName(
pFunctionDecl->getLocStart(), compiler.getSourceManager(), compiler.getLangOpts()) };
aImmediateMacro = name;
- || name.startswith("IMPL_LINK_") )
+ if (name.startswith("IMPL_LINK_") )
{
return true;
}