summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-10 11:07:36 +0200
committerNoel Grandin <noel@peralex.com>2015-04-13 09:37:12 +0200
commitee094bd46f55118993c72af719dc046476f9f311 (patch)
treed4658be34517150ec7881e7929e38f533ff0b393 /compilerplugins
parent26ec80f47df1b32c5e1ae8c96d597ef8c90fee86 (diff)
loplugin:staticmethods
Change-Id: If97f01a05294fa7efd59a8934c7b6f65cda5084a
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/staticmethods.cxx23
1 files changed, 19 insertions, 4 deletions
diff --git a/compilerplugins/clang/staticmethods.cxx b/compilerplugins/clang/staticmethods.cxx
index e59a48f60072..aaa4f6b798d6 100644
--- a/compilerplugins/clang/staticmethods.cxx
+++ b/compilerplugins/clang/staticmethods.cxx
@@ -103,7 +103,8 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl)
return true;
}
// the DDE has a dummy implementation on Linux and a real one on Windows
- if (getFilename(pCXXMethodDecl->getCanonicalDecl()->getLocStart()) == SRCDIR "/include/svl/svdde.hxx") {
+ std::string aFilename = getFilename(pCXXMethodDecl->getCanonicalDecl()->getLocStart());
+ if (aFilename == SRCDIR "/include/svl/svdde.hxx") {
return true;
}
std::string aParentName = pCXXMethodDecl->getParent()->getQualifiedNameAsString();
@@ -127,10 +128,17 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl)
return true;
}
// the unotools and svl config code stuff is doing weird stuff with a reference-counted statically allocated pImpl class
- if (startsWith(getFilename(pCXXMethodDecl->getCanonicalDecl()->getLocStart()), SRCDIR "/include/unotools")) {
+ if (startsWith(aFilename, SRCDIR "/include/unotools")) {
return true;
}
- if (startsWith(getFilename(pCXXMethodDecl->getCanonicalDecl()->getLocStart()), SRCDIR "/include/svl")) {
+ if (startsWith(aFilename, SRCDIR "/include/svl")) {
+ return true;
+ }
+ if (startsWith(aFilename, SRCDIR "/include/framework") || startsWith(aFilename, SRCDIR "/framework")) {
+ return true;
+ }
+ // there is some odd stuff happening here I don't fully understand, leave it for now
+ if (startsWith(aFilename, SRCDIR "/include/canvas") || startsWith(aFilename, SRCDIR "/canvas")) {
return true;
}
// classes that have static data and some kind of weird reference-counting trick in it's constructor
@@ -145,7 +153,14 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl)
std::string fqn = aParentName + "::" + pCXXMethodDecl->getNameAsString();
// only empty on Linux, not on windows
if (fqn == "OleEmbeddedObject::GetVisualRepresentationInNativeFormat_Impl"
- || fqn == "OleEmbeddedObject::GetRidOfComponent") {
+ || fqn == "OleEmbeddedObject::GetRidOfComponent"
+ || fqn == "connectivity::mozab::ProfileAccess::isProfileLocked"
+ || startsWith(fqn, "SbxDecimal::")
+ || fqn == "SbiDllMgr::Call" || fqn == "SbiDllMgr::FreeDll") {
+ return true;
+ }
+ // used in a function-pointer-table
+ if (startsWith(fqn, "SbiRuntime::Step")) {
return true;
}