[c++20] Implement P0482R6: enable -fchar8_t by default in C++20 mode.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 14 Nov 2018 21:04:34 +0000 (21:04 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 14 Nov 2018 21:04:34 +0000 (21:04 +0000)
commit28ddb91decff9bb9e28cf12e04b2b6bf78cadc3b
treedc6b7c03a84fdb98588da7619835b9fe9c7ae4b1
parentf61a563a19a3f4c999011c8c6287717532dcdfd9
[c++20] Implement P0482R6: enable -fchar8_t by default in C++20 mode.

This unfortunately results in a substantial breaking change when
switching to C++20, but it's not yet clear what / how much we should
do about that. We may want to add a compatibility conversion from
u8 string literals to const char*, similar to how C++98 provided a
compatibility conversion from string literals to non-const char*,
but that's not handled by this patch.

The feature can be disabled in C++20 mode with -fno-char8_t.

llvm-svn: 346892
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/InitPreprocessor.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaInit.cpp
clang/test/Lexer/cxx-features.cpp
clang/test/SemaCXX/char8_t.cpp
clang/test/SemaCXX/cxx2a-compat.cpp
clang/www/cxx_status.html