diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-21 13:34:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-22 07:34:15 +0100 |
commit | bab2753312c960c9eea610e927492775308fdfd5 (patch) | |
tree | 59c8168999ce2bf6a3647e712c8fb3e6c6df3fbc /compilerplugins/clang/unusedenumconstants.py | |
parent | 2e6a38b7f007b36719f5fc002cb4363dec45e0d4 (diff) |
loplugin:unusedenumconstants in EEControlBits
(*) remove effectivly unused enum constants
(*) tweak the plugins heuristics some more to remove false+ in this enum
(*) twweak the python post-processing step to avoid a KeyError
Change-Id: I2943ec94c00f71dcd049f5c9ef33db259c005ba3
Reviewed-on: https://gerrit.libreoffice.org/63709
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/unusedenumconstants.py')
-rwxr-xr-x | compilerplugins/clang/unusedenumconstants.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compilerplugins/clang/unusedenumconstants.py b/compilerplugins/clang/unusedenumconstants.py index ded7f4f8b1aa..24cd0c6ded07 100755 --- a/compilerplugins/clang/unusedenumconstants.py +++ b/compilerplugins/clang/unusedenumconstants.py @@ -205,6 +205,9 @@ writeonlySet = set() for d in writeSet: if d in readSet: continue + # can happen with stuff in workdir or external + if d not in definitionSet: + continue srcLoc = definitionToSourceLocationMap[d]; if (is_ignore(srcLoc)): continue @@ -214,6 +217,9 @@ readonlySet = set() for d in readSet: if d in writeSet: continue + # can happen with stuff in workdir or external + if d not in definitionSet: + continue srcLoc = definitionToSourceLocationMap[d]; if (is_ignore(srcLoc)): continue |