summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-17 15:50:48 +0200
committerNoel Grandin <noel@peralex.com>2015-07-20 10:57:07 +0200
commit600ed089e242a80f5fbf3131b63995eed9d33f3f (patch)
treefbeb02d49350956678688cb793dca7137f1434a9 /compilerplugins
parentdcbbe7741a08f6076f9e020f90cbb730c1edafb9 (diff)
loplugin:unusedmethods sfx2
Change-Id: I40be06a4859a38ef64b6267515917f625a5f176d
Diffstat (limited to 'compilerplugins')
-rwxr-xr-xcompilerplugins/clang/unusedmethods.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/compilerplugins/clang/unusedmethods.py b/compilerplugins/clang/unusedmethods.py
index 27118b286c8b..f76fcb7bbc44 100755
--- a/compilerplugins/clang/unusedmethods.py
+++ b/compilerplugins/clang/unusedmethods.py
@@ -89,16 +89,16 @@ for clazz in sorted(definitionSet - callSet - exclusionSet):
continue
# if this method is const, and there is a non-const variant of it, and the non-const variant is in use, then leave it alone
if (clazz.startswith("const ") and clazz.endswith(" const")):
- clazz2 = clazz[6:len(clazz)-12]
+ clazz2 = clazz[6:len(clazz)-6]
if (clazz2 in callSet):
continue
elif (clazz.endswith(" const")):
- clazz2 = clazz[:len(clazz)-6]
+ clazz2 = clazz[:len(clazz)-6] # strip off " const"
if (clazz2 in callSet):
continue
if (clazz.endswith(" const") and clazz.find("::iterator") != -1):
- clazz2 = clazz.replace("::const_iterator", "::iterator")
- clazz2 = clazz2[:len(clazz)-6] # strip off " const"
+ clazz2 = clazz[:len(clazz)-6] # strip off " const"
+ clazz2 = clazz2.replace("::const_iterator", "::iterator")
if (clazz2 in callSet):
continue
# if this method is non-const, and there is a const variant of it, and the const variant is in use, then leave it alone
@@ -121,6 +121,10 @@ for clazz in sorted(definitionSet - callSet - exclusionSet):
or clazz.find("DdeItem::") != -1
or clazz.find("DdeGetPutItem::") != -1):
continue
+ # the include/tools/rtti.hxx stuff
+ if (clazz.find("::StaticType()") != -1
+ or clazz.find("::IsOf(void *(*)(void))") != -1):
+ continue
print clazz
# add an empty line at the end to make it easier for the unusedmethodsremove plugin to mmap() the output file