This is an archive of the discontinued LLVM Phabricator instance.

clang-cl: Accept MSVC 2015's `/source-charset:utf-8` flag.
ClosedPublic

Authored by thakis on Aug 23 2016, 8:59 AM.

Details

Reviewers
hans
Summary

clang already treats all inputs as utf-8. Warn if anything but utf-8 is passed.

Do this by mapping source-charset to finput-charset, which already behaves like this. Slightly tweak finput-charset to accept "utf-8" case-insensitively. This matches gcc's and cl.exe's behavior, and IANA says that character set names are case-insensitive.

Diff Detail

Event Timeline

thakis updated this revision to Diff 69004.Aug 23 2016, 8:59 AM
thakis retitled this revision from to clang-cl: Accept MSVC 2015's `/source-charset:utf-8` flag..
thakis updated this object.
thakis added a reviewer: hans.
thakis added a subscriber: cfe-commits.
hans accepted this revision.Aug 23 2016, 9:36 AM
hans edited edge metadata.

lgtm

This revision is now accepted and ready to land.Aug 23 2016, 9:36 AM
thakis closed this revision.Aug 23 2016, 9:55 AM

279531, thanks!