[clang] [clang] Enforce UTF-8 in `make_cxx_dr_status` (PR #131816)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 18 08:05:21 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Vlad Serebrennikov (Endilll)
<details>
<summary>Changes</summary>
Otherwise Windows users have troubles with lexer tests that use emojis.
---
Full diff: https://github.com/llvm/llvm-project/pull/131816.diff
1 Files Affected:
- (modified) clang/www/make_cxx_dr_status (+1-1)
``````````diff
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))
``````````
</details>
https://github.com/llvm/llvm-project/pull/131816
More information about the cfe-commits
mailing list