d2f9308220af22bfc1bcd3bc2cad118dbd8be013 |
|
19-Sep-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Make Preprocessor::Lex non-recursive. Before this patch, Lex() would recurse whenever the current lexer changed (e.g. upon entry into a macro). This patch turns the recursion into a loop: the various lex routines now don't return a token when the current lexer changes, and at the top level Preprocessor::Lex() now loops until it finds a token. Normally, the recursion wouldn't end up being very deep, but the recursion depth can explode in edge cases like a bunch of consecutive macros which expand to nothing (like in the testcase test/Preprocessor/macro_expand_empty.c in this patch). <rdar://problem/14569770> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
55fc873017f10f6f566b182b70f6fc22aefa3464 |
|
04-Dec-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Sort all of Clang's files under 'lib', and fix up the broken headers uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
6e649737898ffb627c377fd8fa0a437d0a42ae4a |
|
13-Nov-2012 |
Daniel Dunbar <daniel@zuster.org> |
Revert r167801, "[preprocessor] When #including something that contributes no tokens at all,". This change broke External/Nurbs in LLVM test-suite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
4d10b40ea8ee489c7b9194aa2b025df4ecd2ab01 |
|
13-Nov-2012 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
[preprocessor] When #including something that contributes no tokens at all, don't recursively continue lexing. This avoids a stack overflow with a sequence of many empty #includes. rdar://11988695 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
d986853fcb6a5ac15235aa6af9a096f25050d596 |
|
17-Jun-2012 |
James Dennett <jdennett@google.com> |
Documentation cleanup: Use \brief for summaries, and escape # characters. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
99ba9e3bd70671f3441fb974895f226a83ce0e66 |
|
20-Dec-2011 |
David Blaikie <dblaikie@gmail.com> |
Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
d9d2b679d0728ea7f539f38aaea38e26b8b08043 |
|
22-Aug-2011 |
Argyrios Kyrtzidis <akyrtzi@gmail.com> |
Boost the efficiency of SourceManager::getMacroArgExpandedLocation. Currently getMacroArgExpandedLocation is very inefficient and for the case of a location pointing at the main file it will end up checking almost all of the SLocEntries. Make it faster: -Use a map of macro argument chunks to their expanded source location. The map is for a single source file, it's stored in the file's ContentCache and lazily computed, like the source lines cache. -In SLocEntry's FileInfo add an 'unsigned NumCreatedFIDs' field that keeps track of the number of FileIDs (files and macros) that were created during preprocessing of that particular file SLocEntry. This is useful when computing the macro argument map in skipping included files while scanning for macro arg FileIDs that lexed from a specific source file. Due to padding, the new field does not increase the size of SLocEntry. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
84021556baceb76eedf7d44be8ba71d9b8cfacce |
|
28-Feb-2011 |
Peter Collingbourne <peter@pcc.me.uk> |
Rename tok::eom to tok::eod. The previous name was inaccurate as this token in fact appears at the end of every preprocessing directive, not just macro definitions. No functionality change, except for a diagnostic tweak. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.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/PreprocessorLexer.cpp
|
500d3297d2a21edeac4d46cbcbe21bc2352c2a28 |
|
29-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
move library-specific diagnostic headers into library private dirs. Reduce redundant #includes. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
20c6b3b85e186cd52d5d99489132d71d498159eb |
|
27-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Split the single monolithic DiagnosticKinds.def file into one .def file for each library. This means that adding a diagnostic to sema doesn't require all the other libraries to be rebuilt. Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
2b2453a7d8fe732561795431f39ceb2b2a832d84 |
|
17-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
this massive patch introduces a simple new abstraction: it makes "FileID" a concept that is now enforced by the compiler's type checker instead of yet-another-random-unsigned floating around. This is an important distinction from the "FileID" currently tracked by SourceLocation. *That* FileID may refer to the start of a file or to a chunk within it. The new FileID *only* refers to the file (and its #include stack and eventually #line data), it cannot refer to a chunk. FileID is a completely opaque datatype to all clients, only SourceManager is allowed to poke and prod it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
df7c17a8d02fe09a3466786bae3e40fc3252687a |
|
16-Jan-2009 |
Chris Lattner <sabre@nondot.org> |
Change some terminology in SourceLocation: instead of referring to the "physical" location of tokens, refer to the "spelling" location. This is more concrete and useful, tokens aren't really physical objects! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
306fda76b0818eb7c215094123f2e16729a44aed |
|
22-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
remove a sneaky version of Diag hiding in PreprocessorLexer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
74d15dfd183b2082e8a5d4dfbf66bd861b220901 |
|
22-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Change the Lexer::Diag method to not magically silence warnings, force the caller to check instead. This eliminates the need (and the risk!) of weird null DiagnosticBuilder's floating around. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
452e37837a48b2f0ced144784277fd4d28cbede9 |
|
20-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
- Default initialize ParsingPreprocessorDirective, ParsingFilename, and LexingRawMode in the ctor of PreprocessorLexer. - PTHLexer: Use "LastToken" instead of "NumToken" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
41938c8493b4380df738263166b746eacb33c309 |
|
19-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
- Move static function IsNonPragmaNonMacroLexer into Preprocessor.h. - Add variants of IsNonPragmaNonMacroLexer to accept an IncludeMacroStack entry (simplifies some uses). - Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile. - Add 'FileID' to PreprocessorLexer, and have Preprocessor query this fileid when looking up the FileEntry for a file Performance testing of -Eonly on Cocoa.h shows no performance regression because of this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
204b2fed909b1eabea7aeb6caadd7cff718edee5 |
|
18-Nov-2008 |
Chris Lattner <sabre@nondot.org> |
Remove the last of the old-style Preprocessor::Diag methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
d6a2e7d71e9a910c45a3eb0268a5d94635003d58 |
|
13-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Move some diagnostic handling to PreprocessorLexer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
2c71d0f00e40b7b0a85561d430f52247b9c6e7f2 |
|
12-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Add virtual dtor to PreprocessorLexer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|
ab91b7086cceadce2cfd6a69cc90cebcdfcea07f |
|
12-Nov-2008 |
Ted Kremenek <kremenek@apple.com> |
Move LexIncludeFilename from Lexer to PreprocessorLexer. PreprocessorLexer now has a virtual method "IndirectLex" which allows it to call the lex method of its subclasses. This is not for performance intensive operations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Lex/PreprocessorLexer.cpp
|