diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-08 08:08:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-08 08:08:45 +0000 |
commit | 1fa495304c81e03f07f278a47b5efe9317104aab (patch) | |
tree | c972c7493bcaba9b9cb88f4df32ff6fc6018fd0d /lib/Lex/Lexer.cpp | |
parent | 6b5e4f0cc5672c7d5449db28d5ead94d32407cb2 (diff) |
simplify some logic by making ScratchBuffer handle the application of trailing
\0's to created tokens instead of making all clients do it. No functionality
change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r-- | lib/Lex/Lexer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp index efbd84c879..c68d21c7e7 100644 --- a/lib/Lex/Lexer.cpp +++ b/lib/Lex/Lexer.cpp @@ -167,6 +167,7 @@ Lexer *Lexer::Create_PragmaLexer(SourceLocation SpellingLoc, L->BufferPtr = StrData; L->BufferEnd = StrData+TokLen; + assert(L->BufferEnd[0] == 0 && "Buffer is not nul terminated!"); // Set the SourceLocation with the remapping information. This ensures that // GetMappedTokenLoc will remap the tokens as they are lexed. |