[llvm] c84f5a9 - [Github] Skip MIR files for undef check (#120919)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 24 01:09:38 PST 2024
Author: Aiden Grossman
Date: 2024-12-24T01:09:34-08:00
New Revision: c84f5a9e00c02e6a4349846ed59ec85154b65e3f
URL: https://github.com/llvm/llvm-project/commit/c84f5a9e00c02e6a4349846ed59ec85154b65e3f
DIFF: https://github.com/llvm/llvm-project/commit/c84f5a9e00c02e6a4349846ed59ec85154b65e3f.diff
LOG: [Github] Skip MIR files for undef check (#120919)
This patch skips checking files with a .mir extension for the presence
of undef. This was creating false positives that got reported on
discourse.
Added:
Modified:
llvm/utils/git/code-format-helper.py
Removed:
################################################################################
diff --git a/llvm/utils/git/code-format-helper.py b/llvm/utils/git/code-format-helper.py
index 36fc5ee4c3d527..48a338aca9c8e6 100755
--- a/llvm/utils/git/code-format-helper.py
+++ b/llvm/utils/git/code-format-helper.py
@@ -379,6 +379,10 @@ def format_run(self, changed_files: List[str], args: FormatArgs) -> Optional[str
# Each file is prefixed like:
#
diff --git a/file b/file
for file in re.split("^
diff --git ", stdout, 0, re.MULTILINE):
+ # We skip checking in MIR files as undef is a valid token and not
+ # going away.
+ if file.endswith(".mir"):
+ continue
# search for additions of undef
if re.search(r"^[+](?!\s*#\s*).*(\bundef\b|UndefValue::get)", file, re.MULTILINE):
files.append(re.match("a/([^ ]+)", file.splitlines()[0])[1])
More information about the llvm-commits
mailing list