summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-11-29 19:45:17 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-11-29 19:45:17 +0000
commit8110c9df221ed2e7c3b9652092cdba825d7cd91e (patch)
treefafbc9b7c15d4d19ec100673c5343e5d008da3c3 /clang/lib/AST/ASTContext.cpp
parent831b65202053cd7e9d1994310ccf075201750a60 (diff)
downloadbcm5719-llvm-8110c9df221ed2e7c3b9652092cdba825d7cd91e.tar.gz
bcm5719-llvm-8110c9df221ed2e7c3b9652092cdba825d7cd91e.zip
Support constant expression evaluation for wchar_t versions of simple string
functions, in order to support constexpr std::char_traits<wchar_t>. llvm-svn: 288193
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 26c7938c983..62d9b6537db 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -8554,6 +8554,10 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
assert(HowLong == 0 && !Signed && !Unsigned && "Bad modifiers for 'z'!");
Type = Context.getSizeType();
break;
+ case 'w': // wchar_t.
+ assert(HowLong == 0 && !Signed && !Unsigned && "Bad modifiers for 'w'!");
+ Type = Context.getWideCharType();
+ break;
case 'F':
Type = Context.getCFConstantStringType();
break;
OpenPOWER on IntegriCloud