summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-05-01 05:02:45 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-05-01 05:02:45 +0000
commit3a8244df6fb88a6670470e603445c72f224db9e3 (patch)
tree197016a8600cd39037941ce7079e0d9867edacb0 /clang/lib/Sema/SemaTemplate.cpp
parent33dc01d105c08644c5b08c8c37879c6528edfdea (diff)
downloadbcm5719-llvm-3a8244df6fb88a6670470e603445c72f224db9e3.tar.gz
bcm5719-llvm-3a8244df6fb88a6670470e603445c72f224db9e3.zip
Implement P0482R2, support for char8_t type.
This is not yet part of any C++ working draft, and so is controlled by the flag -fchar8_t rather than a -std= flag. (The GCC implementation is controlled by a flag with the same name.) This implementation is experimental, and will be removed or revised substantially to match the proposal as it makes its way through the C++ committee. llvm-svn: 331244
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index d98176ad2e5..04fdfaea75f 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -6771,11 +6771,11 @@ Sema::BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg,
Expr *E;
if (T->isAnyCharacterType()) {
- // This does not need to handle u8 character literals because those are
- // of type char, and so can also be covered by an ASCII character literal.
CharacterLiteral::CharacterKind Kind;
if (T->isWideCharType())
Kind = CharacterLiteral::Wide;
+ else if (T->isChar8Type() && getLangOpts().Char8)
+ Kind = CharacterLiteral::UTF8;
else if (T->isChar16Type())
Kind = CharacterLiteral::UTF16;
else if (T->isChar32Type())
OpenPOWER on IntegriCloud