Skip to content

Commit

Permalink
[Github] Skip MIR files for undef check (llvm#120919)
Browse files Browse the repository at this point in the history
This patch skips checking files with a .mir extension for the presence
of undef. This was creating false positives that got reported on
discourse.
  • Loading branch information
boomanaiden154 authored Dec 24, 2024
1 parent ccbbacf commit c84f5a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions llvm/utils/git/code-format-helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit c84f5a9

Please sign in to comment.