diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-08 01:34:56 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-08 01:34:56 +0000 |
commit | dd66be718f23c8149d74ae8b011b002e11e8d5ba (patch) | |
tree | bf101091563424b330a0cdff5423e2533e8756aa /lib/Lex | |
parent | ffea6b4560cee39bd2a26f478e57da19fc3b47b2 (diff) |
User-defined literal support for character literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex')
-rw-r--r-- | lib/Lex/LiteralSupport.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp index e3ff77f4f0..e0bdc5f858 100644 --- a/lib/Lex/LiteralSupport.cpp +++ b/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 |