aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpackaging-tools/resetboring.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/packaging-tools/resetboring.py b/packaging-tools/resetboring.py
index a9f01e8c6..263b42091 100755
--- a/packaging-tools/resetboring.py
+++ b/packaging-tools/resetboring.py
@@ -617,7 +617,7 @@ class Selector(object): # Select interesting changes, discard boring.
for pair in (('Q_QDOC', 'Q_CLANG_QDOC'),
('Q_DECL_FINAL', 'final'),
('Q_DECL_CONSTEXPR', 'constexpr'),
- ('Q_DECL_NOTHROW', 'noexcept')):
+ ):
def test(words, k=pair[1]):
return k in words
def purge(words, p=pair):
@@ -653,14 +653,6 @@ class Selector(object): # Select interesting changes, discard boring.
# but the brace-matching is a bit much for this parser; and it
# tends to get split across lines anyway ...
- # Synonyms for 0:
- for key in ('Q_NULLPTR', 'nullptr'):
- def test(words, z=key):
- return z in words
- def purge(words, z=key):
- return [('0', 'Q_NULLPTR', 'nullptr') if w == z else w for w in words]
- yield test, purge
-
# Filter out various common end-of-line comments:
for sought in (('//', '=', 'default'), ('//', 'LCOV_EXCL_LINE')):
def test(tokens, sought=sought, size=len(sought)):
@@ -705,6 +697,18 @@ class Selector(object): # Select interesting changes, discard boring.
return words
yield test, purge
+ # Multi-step transitions (oldest first in each tuple):
+ for seq in (('0', 'Q_NULLPTR', 'nullptr'),
+ # Needs to happen after handling of Q_DECL_NOEXCEPT_EXPR():
+ ('Q_DECL_NOTHROW', 'Q_DECL_NOEXCEPT', 'noexcept'),
+ ):
+ for key in seq[1:]:
+ def test(words, z=key):
+ return z in words
+ def purge(words, z=key, s=seq):
+ return [s if w == z else w for w in words]
+ yield test, purge
+
# Used by next two #if-ery mungers:
def find(words, key):
assert None in key # so result *does* get set if we succeed