mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 16:56:35 +00:00
[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.
This commit is contained in:
parent
ccbbacf0fa
commit
c84f5a9e00
@ -379,6 +379,10 @@ You can test this locally with the following command:
|
||||
# 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])
|
||||
|
Loading…
x
Reference in New Issue
Block a user