summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-08 08:08:45 +0000
committerChris Lattner <sabre@nondot.org>2009-03-08 08:08:45 +0000
commitfa217bda402c3bf69527559fd3fef2e79db4bf1a (patch)
treebcc11dcd25a44b114d513831eff782bf1d289297 /clang/lib/Lex/Lexer.cpp
parentdbb05f15a42707b9c9429246d92fca9052edcab8 (diff)
downloadbcm5719-llvm-fa217bda402c3bf69527559fd3fef2e79db4bf1a.tar.gz
bcm5719-llvm-fa217bda402c3bf69527559fd3fef2e79db4bf1a.zip
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. llvm-svn: 66373
Diffstat (limited to 'clang/lib/Lex/Lexer.cpp')
-rw-r--r--clang/lib/Lex/Lexer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index efbd84c879e..c68d21c7e79 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud