[PATCH] D85932: [UpdateTestChecks] Match 'attributes #' at the end
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 15 14:03:00 PDT 2020
jdoerfert added a comment.
Cool, some initial comments below :)
================
Comment at: llvm/utils/UpdateTestChecks/common.py:320
+ NamelessValue(r'LOOP', r'!llvm.loop !', r'', r'[0-9]+?', r''),
+ NamelessValue(r'META', r'metadata !', r'', r'[0-9]+?', r''),
]
----------------
Nit: Align the columns. Maybe reorder so we have prefix and then regexp, we can then also make those a pair: `('r'%', r'...'), (...)`
================
Comment at: llvm/utils/UpdateTestChecks/common.py:549
+
+ global_ir_value_re_str = lhs_re_str + r'\s=\s' + rhs_re_str
+ global_ir_value_re = re.compile(global_ir_value_re_str)
----------------
do we need to ensure this is a full line match? `r'^' + ... + '$'` or something?
================
Comment at: llvm/utils/UpdateTestChecks/common.py:554
+ lhs_re = re.compile(lhs_re_str)
+ rhs_re = re.compile(rhs_re_str)
+ for prefix in prefixes:
----------------
we can do this once further out.
================
Comment at: llvm/utils/UpdateTestChecks/common.py:567
+ found = True
+ break
+ # Found conflicting lines
----------------
Can you explain the above conditionals in a comment?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85932/new/
https://reviews.llvm.org/D85932
More information about the llvm-commits
mailing list