Skip to content

Commit c84f5a9

Browse files
[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.
1 parent ccbbacf commit c84f5a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/utils/git/code-format-helper.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,10 @@ def format_run(self, changed_files: List[str], args: FormatArgs) -> Optional[str
379379
# Each file is prefixed like:
380380
# diff --git a/file b/file
381381
for file in re.split("^diff --git ", stdout, 0, re.MULTILINE):
382+
# We skip checking in MIR files as undef is a valid token and not
383+
# going away.
384+
if file.endswith(".mir"):
385+
continue
382386
# search for additions of undef
383387
if re.search(r"^[+](?!\s*#\s*).*(\bundef\b|UndefValue::get)", file, re.MULTILINE):
384388
files.append(re.match("a/([^ ]+)", file.splitlines()[0])[1])

0 commit comments

Comments
 (0)