summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/unusedenumconstants.py
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-21 12:13:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-21 12:14:35 +0200
commit0acbfd466aa8070c99c1d93f499fa5abb6b0d86a (patch)
tree94ec591a5f90ab49b20ae33cd4e130c1967d5b69 /compilerplugins/clang/unusedenumconstants.py
parent40710c488de3e4eef585c5a5276c9a0943d36f2e (diff)
loplugin, remove unnecessary filtering in post-processing
removing things that point to the same source location is only really necessary for the method-based analyses, the other's dont need it, and it can hide stuff we are interested in Change-Id: Ib5c3b4c2ed4011c158a199fcd08096285976b831
Diffstat (limited to 'compilerplugins/clang/unusedenumconstants.py')
-rwxr-xr-xcompilerplugins/clang/unusedenumconstants.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py
index c498f38c76d7..2a2251776a17 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -43,18 +43,6 @@ with io.open("workdir/loplugin.unusedenumconstants.log", "rb", buffering=1024*10
else:
print( "unknown line: " + line)
-# Invert the definitionToSourceLocationMap
-# If we see more than one method at the same sourceLocation, it's being autogenerated as part of a template
-# and we should just ignore
-sourceLocationToDefinitionMap = {}
-for k, v in definitionToSourceLocationMap.iteritems():
- sourceLocationToDefinitionMap[v] = sourceLocationToDefinitionMap.get(v, [])
- sourceLocationToDefinitionMap[v].append(k)
-for k, definitions in sourceLocationToDefinitionMap.iteritems():
- if len(definitions) > 1:
- for d in definitions:
- definitionSet.remove(d)
-
def startswith_one_of( srcLoc, fileSet ):
for f in fileSet:
if srcLoc.startswith(f):