summaryrefslogtreecommitdiff
path: root/lib/Lex/MacroArgs.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-27 05:40:30 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-27 05:40:30 +0000
commit5cee1195584fa8672253139c86e922daeda69b9e (patch)
treee1b36e0f628359bb42d22d78c74e931057b962de /lib/Lex/MacroArgs.cpp
parent6fa8f86b8188c6d3c4d6616122a71ccd72a0c78a (diff)
downloadclang-5cee1195584fa8672253139c86e922daeda69b9e.tar.gz
Add support for C++0x unicode string and character literals, from Craig Topper!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/MacroArgs.cpp')
-rw-r--r--lib/Lex/MacroArgs.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Lex/MacroArgs.cpp b/lib/Lex/MacroArgs.cpp
index 968c15e3c2..ccd0b705c8 100644
--- a/lib/Lex/MacroArgs.cpp
+++ b/lib/Lex/MacroArgs.cpp
@@ -208,7 +208,13 @@ Token MacroArgs::StringifyArgument(const Token *ArgToks,
// by 6.10.3.2p2.
if (Tok.is(tok::string_literal) || // "foo"
Tok.is(tok::wide_string_literal) || // L"foo"
- Tok.is(tok::char_constant)) { // 'x' and L'x'.
+ Tok.is(tok::utf8_string_literal) || // u8"foo"
+ Tok.is(tok::utf16_string_literal) || // u"foo"
+ Tok.is(tok::utf32_string_literal) || // U"foo"
+ Tok.is(tok::char_constant) || // 'x'
+ Tok.is(tok::wide_char_constant) || // L'x'.
+ Tok.is(tok::utf16_char_constant) || // u'x'.
+ Tok.is(tok::utf32_char_constant)) { // U'x'.
bool Invalid = false;
std::string TokStr = PP.getSpelling(Tok, &Invalid);
if (!Invalid) {