Skip to content

[clang] Enforce UTF-8 in make_cxx_dr_status #131816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 18, 2025

Conversation

Endilll
Copy link
Contributor

@Endilll Endilll commented Mar 18, 2025

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

Otherwise Windows users have troubles with lexer tests that use emojis.
@Endilll Endilll added the clang Clang issues not falling into any other category label Mar 18, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 18, 2025

@llvm/pr-subscribers-clang

Author: Vlad Serebrennikov (Endilll)

Changes

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 --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))

@Endilll
Copy link
Contributor Author

Endilll commented Mar 18, 2025

#131812 is needed to successfully run the script.

@Endilll Endilll merged commit a21dd25 into llvm:main Mar 18, 2025
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants