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
This commit is contained in:
Noel Grandin
2018-11-21 12:13:05 +02:00
parent 40710c488d
commit 0acbfd466a
6 changed files with 0 additions and 67 deletions

View File

@@ -42,18 +42,6 @@ with io.open("workdir/loplugin.constfields.log", "rb", buffering=1024*1024) as t
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 it
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)
# Calculate can-be-const-field set
canBeConstFieldSet = set()
for d in definitionSet: