[clang] a21dd25 - [clang] Enforce UTF-8 in `make_cxx_dr_status` (#131816)

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 18 14:46:51 PDT 2025


Author: Vlad Serebrennikov
Date: 2025-03-19T01:46:48+04:00
New Revision: a21dd255ad79442a847581e3f06900ba0a534a49

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

LOG: [clang] Enforce UTF-8 in `make_cxx_dr_status` (#131816)

Otherwise Windows users have troubles with lexer tests that use emojis.

Added: 
    

Modified: 
    clang/www/make_cxx_dr_status

Removed: 
    


################################################################################
diff  --git a/clang/www/make_cxx_dr_status b/clang/www/make_cxx_dr_status
index 05de96119fc18..c787bbaff0a36 100755
--- a/clang/www/make_cxx_dr_status
+++ b/clang/www/make_cxx_dr_status
@@ -39,7 +39,7 @@ def collect_tests():
       continue
     test_cpp = os.path.join(dr_test_dir, test_cpp)
     found_any = False;
-    for match in re.finditer(status_re, open(test_cpp, 'r').read()):
+    for match in re.finditer(status_re, open(test_cpp, 'r', encoding="utf-8").read()):
       dr_number = int(match.group(1))
       if dr_number in status_map:
         print("error: Comment for cwg{} encountered more than once. Duplicate found in {}".format(dr_number, test_cpp))


        


More information about the cfe-commits mailing list