summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/LiteralSupport.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-03-08 01:34:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-03-08 01:34:56 +0000
commit75b67d6dc5c8917c6d2460d053ba234722f209a1 (patch)
treec5af0ed3b4f65046546ba993e986c7293fec894b /clang/lib/Lex/LiteralSupport.cpp
parent978dfc0d1e27e5d2a0966a407333b4fe18644a41 (diff)
downloadbcm5719-llvm-75b67d6dc5c8917c6d2460d053ba234722f209a1.tar.gz
bcm5719-llvm-75b67d6dc5c8917c6d2460d053ba234722f209a1.zip
User-defined literal support for character literals.
llvm-svn: 152277
Diffstat (limited to 'clang/lib/Lex/LiteralSupport.cpp')
-rw-r--r--clang/lib/Lex/LiteralSupport.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp
index e3ff77f4f04..e0bdc5f8589 100644
--- a/clang/lib/Lex/LiteralSupport.cpp
+++ b/clang/lib/Lex/LiteralSupport.cpp
@@ -791,6 +791,7 @@ CharLiteralParser::CharLiteralParser(const char *begin, const char *end,
--end;
} while (end[-1] != '\'');
UDSuffixBuf.assign(end, UDSuffixEnd);
+ UDSuffixOffset = end - begin + 1;
}
// Trim the ending quote.
@@ -1113,6 +1114,8 @@ void StringLiteralParser::init(const Token *StringToks, unsigned NumStringToks){
if (UDSuffixBuf.empty()) {
UDSuffixBuf.assign(UDSuffix);
+ UDSuffixToken = i;
+ UDSuffixOffset = ThisTokEnd - ThisTokBuf;
UDSuffixTokLoc = StringToks[i].getLocation();
} else if (!UDSuffixBuf.equals(UDSuffix)) {
// C++11 [lex.ext]p8: At the end of phase 6, if a string literal is the
OpenPOWER on IntegriCloud