[llvm] 5fb788b - github actions/undef warnings: allow newlines after undef

Nuno Lopes via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 15 18:26:27 PDT 2025


Author: Nuno Lopes
Date: 2025-10-16T02:26:18+01:00
New Revision: 5fb788be03c6adbe0afa33c129df442e280f5bfa

URL: https://github.com/llvm/llvm-project/commit/5fb788be03c6adbe0afa33c129df442e280f5bfa
DIFF: https://github.com/llvm/llvm-project/commit/5fb788be03c6adbe0afa33c129df442e280f5bfa.diff

LOG: github actions/undef warnings: allow newlines after undef

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 f60a83905331e..406a72817acb8 100755
--- a/llvm/utils/git/code-format-helper.py
+++ b/llvm/utils/git/code-format-helper.py
@@ -391,7 +391,7 @@ def format_run(self, changed_files: List[str], args: FormatArgs) -> Optional[str
             return None
 
         # Use git to find files that have had a change in the number of undefs
-        regex = "([^a-zA-Z0-9#_-]undef[^a-zA-Z0-9,_-]|UndefValue::get)"
+        regex = "([^a-zA-Z0-9#_-]undef([^a-zA-Z0-9_-]|$)|UndefValue::get)"
         cmd = ["git", "
diff ", "-U0", "--pickaxe-regex", "-S", regex]
 
         if args.start_rev and args.end_rev:


        


More information about the llvm-commits mailing list