summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPCaching.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove the check for repeated tok::eofs, we are not supposed to go past eof ↵Argyrios Kyrtzidis2010-07-121-9/+4
| | | | | | | | so this code is totally unnecessary. llvm-svn: 108199
* If we are past tok::eof and in caching lex mode, avoid caching repeated ↵Argyrios Kyrtzidis2010-07-121-4/+12
| | | | | | tok::eofs. llvm-svn: 108175
* we do in fact have to cache the EOF token returned by the preprocessor.Chris Lattner2010-07-121-6/+3
| | | | | | | | | | In the case of backtracking, the cached token lexer will be the only lexer on the stack, without this the token stack will be empty and EOF won't be returned. This fixes PR7072. llvm-svn: 108124
* When placing an annotation token over an existing annotation token, make ↵Sebastian Redl2010-02-081-1/+1
| | | | | | sure that the new token's range extends to the end of the old token. Assert that in AnnotateCachedTokens. Fixes PR6248. llvm-svn: 95555
* Remove an overly-eager assertion when replacing tokens with anDouglas Gregor2009-11-121-2/+0
| | | | | | | | | | | annotation token, because some of the tokens we're annotating might not be in the set of cached tokens (we could have consumed them unconditionally). Also, move the tentative parsing from ParseTemplateTemplateArgument into the one caller that needs it, improving recovery. llvm-svn: 86904
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-1/+1
| | | | llvm-svn: 81346
* fix segfault (because of erasing after the vector boundaries) when the ↵Nuno Lopes2009-07-261-1/+2
| | | | | | cached token position is at the end llvm-svn: 77159
* This change refactors some of the low-level lexer interfaces a bit.Chris Lattner2009-01-261-1/+1
| | | | | | | | | | | | | Token now has a class of kinds for "literals", which include numeric constants, strings, etc. These tokens can optionally have a pointer to the start of the token in the lexer buffer. This makes it faster to get spelling and do other gymnastics, because we don't have to go through source locations. This change is performance neutral, but will make other changes more feasible down the road. llvm-svn: 63028
* Remove Preprocessor::CacheTokens boolean data member. The same functionality ↵Argyrios Kyrtzidis2008-11-191-4/+1
| | | | | | can be provided by using Preprocessor::isBacktrackEnabled(). llvm-svn: 59631
* Use PushIncludeMacroStack() instead of manually manipulating the include stack.Ted Kremenek2008-11-121-4/+1
| | | | llvm-svn: 59181
* Introduce annotation tokens, a special kind of token, created and used only ↵Argyrios Kyrtzidis2008-11-081-0/+24
| | | | | | | | by the parser to replace a group of tokens with a single token encoding semantic information. Will be fully utilized later for C++ nested-name-specifiers. llvm-svn: 58911
* Line endings: CRLF -> LFArgyrios Kyrtzidis2008-09-051-8/+8
| | | | llvm-svn: 55829
* Rename Preprocessor::DisableBacktrack -> Preprocessor::CommitBacktrackedTokens.Argyrios Kyrtzidis2008-08-241-10/+10
| | | | llvm-svn: 55281
* Change line endings: CRLF -> LFArgyrios Kyrtzidis2008-08-231-30/+30
| | | | llvm-svn: 55235
* Allow nested backtracks.Argyrios Kyrtzidis2008-08-221-0/+32
| | | | llvm-svn: 55204
* Allow the preprocessor to cache the lexed tokens, so that we can do ↵Argyrios Kyrtzidis2008-08-101-0/+63
efficient lookahead and backtracking. 1) New public methods added: -EnableBacktrackAtThisPos -DisableBacktrack -Backtrack -isBacktrackEnabled 2) LookAhead() implementation is replaced with a more efficient one. 3) LookNext() is removed. llvm-svn: 54611
OpenPOWER on IntegriCloud