[PATCH] D99415: [Utils] Add prefix parameter in update test checks to avoid FileCheck conflicts
Johannes Doerfert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 26 07:16:08 PDT 2021
jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.
Cool, thanks. LGTM, two nits.
================
Comment at: llvm/utils/UpdateTestChecks/common.py:532
+ and _prefix_filecheck_ir_name:
+ var = _prefix_filecheck_ir_name + var
var = var.replace('.', '_')
----------------
Move the re.match into a helper (also used below), maybe: `may_clash_with_default_check_prefix_name(check_prefix, var)`
================
Comment at: llvm/utils/UpdateTestChecks/common.py:563
+ if nameless_value.check_prefix and re.match(r'^' + nameless_value.check_prefix + r'[0-9]+?$', var, re.IGNORECASE) \
+ and not _prefix_filecheck_ir_name:
+ warn("Change IR value name '%s' or use -prefix-ir-filecheck-name to prevent possible conflict"
----------------
I would not add the `and not _prefix_filecheck...` stuff here because if the other condition holds a warning seems appropriate, maybe the prefix was chosen pooreley, etc.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99415/new/
https://reviews.llvm.org/D99415
More information about the cfe-commits
mailing list