summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/mergeclasses.py
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-07-25 13:22:38 +0200
committerNoel Grandin <noel@peralex.com>2016-07-25 13:23:10 +0200
commit98c90acdfc9813ad8789974df1705e0a240194fd (patch)
treed54f477ef6c814e7ffc06c24f3b5e286ba230f3f /compilerplugins/clang/mergeclasses.py
parent0b8e589875ffd84150470832de18ebd79989efc0 (diff)
loplugins: more consistent naming of output files
Change-Id: Ia26f697cb16078f235c94e4cff449a60c1bbd74e
Diffstat (limited to 'compilerplugins/clang/mergeclasses.py')
-rwxr-xr-xcompilerplugins/clang/mergeclasses.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/compilerplugins/clang/mergeclasses.py b/compilerplugins/clang/mergeclasses.py
index 58a65c58c837..23a15f62af66 100755
--- a/compilerplugins/clang/mergeclasses.py
+++ b/compilerplugins/clang/mergeclasses.py
@@ -7,7 +7,7 @@ definitionSet = set()
parentChildDict = {}
definitionToFileDict = {}
-with open("mergeclasses.log") as txt:
+with open("loplugin.mergeclasses.log") as txt:
for line in txt:
if line.startswith("instantiated:\t"):
@@ -54,6 +54,7 @@ def extractModuleName(clazz):
idx = filename.find("/")
return filename[:idx]
+with open("loplugin.mergeclasses.report", "wt") as f:
for clazz in sorted(definitionSet - instantiatedSet):
# find uninstantiated classes without any subclasses
if (not(clazz in parentChildDict)) or (len(parentChildDict[clazz]) != 1):
@@ -70,5 +71,5 @@ for clazz in sorted(definitionSet - instantiatedSet):
# exclude combinations that span modules because we often use those to make cross-module dependencies more manageable.
if extractModuleName(clazz) != extractModuleName(otherclazz):
continue
- print "merge", clazz, "with", otherclazz
+ f.write( "merge" + clazz + "with" + otherclazz + "\n" )