Page MenuHomePhabricator

ThePhD (ThePhD)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 3 2019, 6:25 PM (204 w, 2 d)

Recent Activity

Sep 4 2021

ThePhD added a comment to D106577: [clang] Define __STDC_ISO_10646__.

Hi, my name is JeanHeyd Meneide. I'm the Project Editor for C, but more importantly I'm the author of this paper: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2728.htm

Sep 4 2021, 10:54 AM · Restricted Project, Restricted Project, Restricted Project

Apr 20 2021

ThePhD added a comment to D93031: Enable fexec-charset option .

Just a tiny comment: could you please make sure the name of the resolved encoding is also propagated to InitPreprocessor.cpp that sets the __clang_literal_encoding__ macro? (https://github.com/llvm/llvm-project/blob/main/clang/lib/Frontend/InitPreprocessor.cpp#L784)

Apr 20 2021, 1:35 PM · Restricted Project, Restricted Project, Restricted Project
ThePhD added a comment to rG701d70d4c25c: String Literal and Wide String Literal Encoding from the Preprocessor.

I actually think it's fine to just do == 8. I was just adding my comments for the benefit of the future, really! Doing a full -fwide-exec-charset= patch is definitely overkill for a simple case like this. I also just know there are a LOT of 8-bit character sets, so assuming UTF-8 might be a bit bad. But, again, you should definitely go ahead with >= 16 as the 2nd check and then leave the 8-bit case as last in the if-else chain:

Apr 20 2021, 12:44 PM
ThePhD added a comment to rG701d70d4c25c: String Literal and Wide String Literal Encoding from the Preprocessor.

The XCore target has 8-bit wchar_t (unsigned char). Should there be a test for width == 8 and set to "UTF-8", or at least not "UTF-16"?

That's definitely news to me! If you can find a reliable way to set the encoding to "UTF-8" (like checking for XCore definitions or something) that could probably be added. Do you know a good way to identify an XCore machine? Is there a specific preprocessor builtin or option that correlates to XCore I can check in the code?

Apr 20 2021, 12:15 PM
ThePhD added a comment to rG701d70d4c25c: String Literal and Wide String Literal Encoding from the Preprocessor.

The XCore target has 8-bit wchar_t (unsigned char). Should there be a test for width == 8 and set to "UTF-8", or at least not "UTF-16"?

Apr 20 2021, 12:14 PM

Apr 13 2021

ThePhD added a comment to D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.

Okay, I'm sold. Thank you for the detailed explanation! The changes LGTM. Do you have commit privileges or would you like me to commit on your behalf? (If you'd like me to commit, what email address and name would you like me to use for commit attribution?)

Apr 13 2021, 11:04 AM · Restricted Project
ThePhD updated the diff for D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.

Oops, almost forgot the doc fixes for the *wide__* macro!

Apr 13 2021, 9:01 AM · Restricted Project
ThePhD added a comment to D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.

...

What about for folks using this from C where there isn't constexpr functionality to help them?

Apr 13 2021, 8:57 AM · Restricted Project
ThePhD updated the diff for D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.

Update the text for the documentation to be more explicit.

Apr 13 2021, 8:20 AM · Restricted Project

Apr 12 2021

ThePhD updated the diff for D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.
Apr 12 2021, 8:22 PM · Restricted Project
ThePhD added a comment to D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.

Exposing this information seems fine to me. I think it'd be more useful to expose it in a way the preprocessor can inspect ...

Apr 12 2021, 7:29 PM · Restricted Project
ThePhD updated the diff for D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.

The tests check for macros in strict byte-value "alphabetical" order. We also need documentation, as was suggested!!

Apr 12 2021, 7:21 PM · Restricted Project
ThePhD updated the diff for D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.

Fixes formatting derps in the pre-linter check.

Apr 12 2021, 6:00 PM · Restricted Project
ThePhD updated the summary of D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.
Apr 12 2021, 3:09 PM · Restricted Project
ThePhD updated the summary of D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.
Apr 12 2021, 3:08 PM · Restricted Project
ThePhD updated the summary of D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.
Apr 12 2021, 3:06 PM · Restricted Project
ThePhD updated the summary of D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.
Apr 12 2021, 3:03 PM · Restricted Project
ThePhD requested review of D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.
Apr 12 2021, 3:03 PM · Restricted Project

Oct 24 2020

ThePhD added a comment to D88741: [SystemZ/z/OS] Add utility class for char set conversion..

Minor addition for this change; if this does go through, llvm-specific macros in C-like languages should expose the chosen name. I submitted a patch and a feature request to MSVC and GCC for their own implementation-specific macros as well:

Oct 24 2020, 6:23 PM · Restricted Project, Restricted Project

Jul 4 2019

ThePhD created D64214: Add documentation for LIBCXX_INCLUDE_TESTS option.
Jul 4 2019, 11:44 AM