This is an archive of the discontinued LLVM Phabricator instance.

[clang-cl] Add /Zc:wchar_t- option
ClosedPublic

Authored by pzheng on May 12 2022, 8:08 PM.

Details

Summary

Map /Zc:wchar_t- to the cc1 flag -fno-wchar which is already supported.

Diff Detail

Event Timeline

pzheng created this revision.May 12 2022, 8:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2022, 8:08 PM
pzheng requested review of this revision.May 12 2022, 8:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2022, 8:08 PM

Seems generally ok.

clang/include/clang/Driver/Options.td
6680–6681

Can you move this up (next to the - flag), and add a help text? It's no longer ignored now (if you do e.g. /Zc:wchar_t- /Zc:wchar_t)

pzheng updated this revision to Diff 429559.May 15 2022, 2:14 PM

Address @thakis's comment

pzheng marked an inline comment as done.May 15 2022, 2:16 PM
pzheng added inline comments.
clang/include/clang/Driver/Options.td
6680–6681

Thanks for the comment, @thakis. I have made the change accordingly.

hans added inline comments.May 17 2022, 5:18 AM
clang/test/Driver/cl-zc.cpp
50

Should probably remove /Zc:wchar_t from the list of ignored options in clang/test/Driver/cl-options.c too.

thakis accepted this revision.May 17 2022, 7:30 AM

Looks good to me after addressing Hans's comment.

Do you have commit access?

This revision is now accepted and ready to land.May 17 2022, 7:30 AM
pzheng updated this revision to Diff 430096.May 17 2022, 9:36 AM
pzheng marked an inline comment as done.

Address @hans's comment

pzheng marked an inline comment as done.May 17 2022, 9:38 AM
pzheng added inline comments.
clang/test/Driver/cl-zc.cpp
50

Good catch. I have updated clang/test/Driver/cl-options.c in the latest change.

pzheng marked an inline comment as done.May 17 2022, 9:38 AM

Looks good to me after addressing Hans's comment.

Do you have commit access?

Thanks for asking, @thakis. I do have comment access.

This revision was landed with ongoing or failed builds.May 17 2022, 9:40 AM
This revision was automatically updated to reflect the committed changes.