diff options
author | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2010-08-30 17:47:05 +0000 |
---|---|---|
committer | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2010-08-30 17:47:05 +0000 |
commit | 6cf750298d3621d8a10a6dd07fcee8e274b9d94d (patch) | |
tree | 2d4b62e04dd3a48b65398bcc56ecc383719fdad8 /lib/Lex/Lexer.cpp | |
parent | 4a551000bee716ac8b1bbe16134a53f0ad221a5a (diff) |
Revert my user-defined literal commits - r1124{58,60,67} pending
some issues being sorted out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r-- | lib/Lex/Lexer.cpp | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp index dabc15951f..118b618f2a 100644 --- a/lib/Lex/Lexer.cpp +++ b/lib/Lex/Lexer.cpp @@ -548,11 +548,6 @@ static void InitCharacterInfo() { isInited = true; } -/// isIdentifierStart - Return true if this is the start character of an -/// identifier, which is [a-zA-Z_]. -static inline bool isIdentifierStart(unsigned char c) { - return (CharInfo[c] & (CHAR_LETTER|CHAR_UNDER)) ? true : false; -} /// isIdentifierBody - Return true if this is the body character of an /// identifier, which is [a-zA-Z0-9_]. @@ -1000,30 +995,8 @@ void Lexer::LexStringLiteral(Token &Result, const char *CurPtr, bool Wide) { // Update the location of the token as well as the BufferPtr instance var. const char *TokStart = BufferPtr; - tok::TokenKind Kind = Wide ? tok::wide_string_literal : tok::string_literal; - - // FIXME: Handle UCNs - unsigned Size; - if (Features.CPlusPlus0x && PP && - isIdentifierStart(getCharAndSize(CurPtr, Size))) { - Result.makeUserDefinedLiteral(ExtraDataAllocator); - Result.setFlagValue(Token::LiteralPortionClean, !Result.needsCleaning()); - Result.setKind(Kind); - Result.setLiteralLength(CurPtr - BufferPtr); - - // FIXME: We hack around the lexer's routines a lot here. - BufferPtr = CurPtr; - bool OldRawMode = LexingRawMode; - LexingRawMode = true; - LexIdentifier(Result, ConsumeChar(CurPtr, Size, Result)); - LexingRawMode = OldRawMode; - PP->LookUpIdentifierInfo(Result, CurPtr); - - CurPtr = BufferPtr; - BufferPtr = TokStart; - } - - FormTokenWithChars(Result, CurPtr, Kind); + FormTokenWithChars(Result, CurPtr, + Wide ? tok::wide_string_literal : tok::string_literal); Result.setLiteralData(TokStart); } |