[llvm] 02fbb6a - [Support] Remove an unnecessary cast (NFC) (#152442)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Aug  7 07:22:53 PDT 2025
    
    
  
Author: Kazu Hirata
Date: 2025-08-07T07:22:50-07:00
New Revision: 02fbb6a290779af31f24d6fffd104675fc10d986
URL: https://github.com/llvm/llvm-project/commit/02fbb6a290779af31f24d6fffd104675fc10d986
DIFF: https://github.com/llvm/llvm-project/commit/02fbb6a290779af31f24d6fffd104675fc10d986.diff
LOG: [Support] Remove an unnecessary cast (NFC) (#152442)
pattern is already of const char *.
Added: 
    
Modified: 
    llvm/lib/Support/regcomp.c
Removed: 
    
################################################################################
diff  --git a/llvm/lib/Support/regcomp.c b/llvm/lib/Support/regcomp.c
index 4ed59823f6f44..f5c47781f3d82 100644
--- a/llvm/lib/Support/regcomp.c
+++ b/llvm/lib/Support/regcomp.c
@@ -305,7 +305,7 @@ llvm_regcomp(llvm_regex_t *preg, const char *pattern, int cflags) {
       return (REG_INVARG);
     len = preg->re_endp - pattern;
   } else {
-    len = strlen((const char *)pattern);
+    len = strlen(pattern);
   }
 
   /* do the mallocs early so failure handling is easy */
        
    
    
More information about the llvm-commits
mailing list