651f13cea278ec967336033dd032faef0e9fc2ec |
|
24-Apr-2014 |
Stephen Hines <srhines@google.com> |
Updated to Clang 3.5a. Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Lex/PPCaching.cpp
|
a06642a3a3a8a9c82d6c636cd3f2c18c4fac66c4 |
|
04-Apr-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[preprocessor] In Preprocessor::CachingLex() check whether there were more tokens cached during the non-cached lex, otherwise we are going to drop them. Fixes a bogus "_Pragma takes a parenthesized string literal" error when expanding consecutive _Pragmas in a macro argument. Part of rdar://11168596 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
d6aba06861c41ccbc4926e5fe3cecd97b20410c0 |
|
04-Jan-2012 |
Douglas Gregor <dgregor@apple.com> |
Don't treat 'import' as a contextual keyword when we're in a caching lexer, or when modules are disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
b8db7cd9ac05c522855631670ec2e97255384f5a |
|
08-Sep-2011 |
Douglas Gregor <dgregor@apple.com> |
Optimize the preprocessor's handling of the __import_module__ keyword. We now handle this keyword in HandleIdentifier, making a note for ourselves when we've seen the __import_module__ keyword so that the next lexed token can trigger a module import (if needed). This greatly simplifies Preprocessor::Lex(), and completely erases the 5.5% -Eonly slowdown Argiris noted when I originally implemented __import_module__. Big thanks to Argiris for noting that horrible regression! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
8951bfde1d72a376b6932a4e14957629701d3481 |
|
12-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove the check for repeated tok::eofs, we are not supposed to go past eof so this code is totally unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
03569eaabceb14a20e23d043135fdccbc7309a96 |
|
12-Jul-2010 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
If we are past tok::eof and in caching lex mode, avoid caching repeated tok::eofs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
63dae6e5ad23cab32f5e556c1b0dc3e4576edc83 |
|
12-Jul-2010 |
Chris Lattner <sabre@nondot.org> |
we do in fact have to cache the EOF token returned by the preprocessor. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
39d67117f896c6e2faa727671ef64b3c04b0e3fe |
|
08-Feb-2010 |
Sebastian Redl <sebastian.redl@getdesigned.at> |
When placing an annotation token over an existing annotation token, make sure that the new token's range extends to the end of the old token. Assert that in AnnotateCachedTokens. Fixes PR6248. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
eaf75f4e0f65444bb122ade7725a4a32badcbf77 |
|
12-Nov-2009 |
Douglas Gregor <dgregor@apple.com> |
Remove an overly-eager assertion when replacing tokens with an 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
1eb4433ac451dc16f4133a88af2d002ac26c58ef |
|
09-Sep-2009 |
Mike Stump <mrs@apple.com> |
Remove tabs, and whitespace cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
1b68f71da2fc9e3771f81e8aa72d59bb26158bec |
|
26-Jul-2009 |
Nuno Lopes <nunoplopes@sapo.pt> |
fix segfault (because of erasing after the vector boundaries) when the cached token position is at the end git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
47246be8ac5b0ddde6c402b8fc6946b6135487b5 |
|
26-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
This change refactors some of the low-level lexer interfaces a bit. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
fad03b2b38a3baea4b67e79e676fee15078e3258 |
|
19-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Remove Preprocessor::CacheTokens boolean data member. The same functionality can be provided by using Preprocessor::isBacktrackEnabled(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
174da89d2d4f4136dc56075176358e3a9cd8604f |
|
12-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Use PushIncludeMacroStack() instead of manually manipulating the include stack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
3604e3895ecd850291b518e5a82246c888ce9d0f |
|
08-Nov-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Introduce annotation tokens, a special kind of token, created and used only 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
02e7e7442ca8fd74c0ba5fbbebf52465338808ce |
|
05-Sep-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Line endings: CRLF -> LF git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
ed5c38682c056c147c8a4abb748b4f285de206dd |
|
24-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Rename Preprocessor::DisableBacktrack -> Preprocessor::CommitBacktrackedTokens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
bff73f7f2d0c9d566c08d1a50eed1fc04d97fa2f |
|
23-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Change line endings: CRLF -> LF git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
a9e274c01ebae45629d93aaa07be450fb77dd3cb |
|
22-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow nested backtracks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|
03db1b31dd926409b7defc1c90b66549464652c0 |
|
10-Aug-2008 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Allow the preprocessor to cache the lexed tokens, so that we can do 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PPCaching.cpp
|