summaryrefslogtreecommitdiffstats
path: root/clang/Lex/Preprocessor.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* cleanup fixme'sChris Lattner2006-07-041-10/+3
| | | | llvm-svn: 38645
* Implement #ident and #sccsChris Lattner2006-07-031-7/+25
| | | | llvm-svn: 38643
* Move a method inlineChris Lattner2006-07-031-10/+0
| | | | llvm-svn: 38639
* #ifdef X, #ifndef X, and #if defined(X) all mark X as used.Chris Lattner2006-07-031-1/+6
| | | | llvm-svn: 38638
* remove dead varChris Lattner2006-07-031-1/+0
| | | | llvm-svn: 38635
* Fix test/Preprocessor/_Pragma-syshdr2.c.Chris Lattner2006-07-031-3/+3
| | | | llvm-svn: 38634
* Implement -Wunused-macros functionality.Chris Lattner2006-07-031-14/+37
| | | | llvm-svn: 38632
* Fix test/Preprocessor/macro_defined.c, factor some code.Chris Lattner2006-07-031-14/+12
| | | | llvm-svn: 38627
* Implement a FIXME: reject '#define defined'.Chris Lattner2006-07-031-3/+7
| | | | llvm-svn: 38625
* Refactor some code into a new Lexer::Stringify method.Chris Lattner2006-07-031-8/+1
| | | | llvm-svn: 38624
* Implement a FIXME: correctly stringify filenames generated by __LINE__.Chris Lattner2006-07-031-2/+10
| | | | llvm-svn: 38622
* Classify fixme'sChris Lattner2006-07-031-13/+12
| | | | llvm-svn: 38621
* Give tokens expanded from _Pragma directives correct source locations.Chris Lattner2006-07-021-1/+1
| | | | | | This implements test/Preprocessor/_Pragma-location.c llvm-svn: 38619
* Move a virtual method out-of-lineChris Lattner2006-07-021-1/+0
| | | | llvm-svn: 38617
* Move some Pragma-related methods from Preprocessor.cpp to Pragma.cppChris Lattner2006-07-021-294/+0
| | | | llvm-svn: 38616
* Remove Lexer::BufferStart, an unneeded instance var.Chris Lattner2006-07-021-1/+1
| | | | llvm-svn: 38615
* Fix some minor issues with _PragmaChris Lattner2006-07-021-11/+10
| | | | llvm-svn: 38610
* Fix some minor bugs handling _Pragma, includingChris Lattner2006-07-021-2/+38
| | | | | | test/Preprocessor/_Pragma_syshdr.c llvm-svn: 38609
* Implement the _Pragma-style of pragma handling, implementingChris Lattner2006-07-021-68/+143
| | | | | | | | test/Preprocessor/_Pragma-poison.c. This unifies the MacroStack and IncludeStack together into IncludeMacroStack. llvm-svn: 38606
* Implement __TIMESTAMP__Chris Lattner2006-07-011-2/+33
| | | | llvm-svn: 38602
* Implement __INCLUDE_LEVEL__ and __BASE_FILE__Chris Lattner2006-07-011-4/+41
| | | | llvm-svn: 38601
* Implement __FILE__Chris Lattner2006-07-011-8/+10
| | | | llvm-svn: 38600
* Implement the __TIME__ and __DATE__ builtin macros.Chris Lattner2006-06-301-3/+43
| | | | llvm-svn: 38597
* Give tokens from the scratch buffer correct source locations.Chris Lattner2006-06-291-0/+1
| | | | llvm-svn: 38591
* Implement the __LINE__ builtin macro.Chris Lattner2006-06-281-8/+46
| | | | llvm-svn: 38589
* Remove dead variables.Chris Lattner2006-06-281-34/+58
| | | | | | | Add initial support for builtin macros, including warning if they are defined or undefined. Register __LINE__ as a builtin macro. llvm-svn: 38586
* Refactor HandleIdentifier to pull macro expansion into its own method.Chris Lattner2006-06-261-73/+78
| | | | llvm-svn: 38583
* Allow expansion to single token identifiers if they are not macrosChris Lattner2006-06-261-3/+3
| | | | llvm-svn: 38581
* Implement Preprocessor/macro_expandloc.c by giving the optimized macroChris Lattner2006-06-261-3/+11
| | | | | | expansion case a correct source location. llvm-svn: 38580
* Add a noteChris Lattner2006-06-261-0/+2
| | | | llvm-svn: 38578
* implement #pragma GCC dependencyChris Lattner2006-06-251-22/+63
| | | | llvm-svn: 38574
* Fix Preprocessor/poison_expansion.cChris Lattner2006-06-251-1/+3
| | | | llvm-svn: 38573
* Implement #pragma GCC system_headerChris Lattner2006-06-251-7/+33
| | | | llvm-svn: 38569
* Finish implementation of #pragma once. Implement #pragma GCC poison.Chris Lattner2006-06-241-8/+65
| | | | llvm-svn: 38568
* implement the pragma handling infrastructure. The only pragma so far isChris Lattner2006-06-241-18/+109
| | | | | | #pragma once, and it is not completely implemented. llvm-svn: 38566
* increase the performance of skipping (#if 0) by optimizing lookup of ↵Chris Lattner2006-06-221-12/+33
| | | | | | directive names. llvm-svn: 38564
* Speed up directive matching by not using getSpelling(), and not copying ↵Chris Lattner2006-06-221-22/+22
| | | | | | | | std::strings around. llvm-svn: 38563
* Track which headers are system and non-C++-clean-system headers. Use thisChris Lattner2006-06-221-27/+55
| | | | | | | information to print the 3/4 flags correctly on #line directives emitted in -E mode. llvm-svn: 38562
* Improve #line emission in -E mode to include file entry/exits. This isChris Lattner2006-06-211-3/+16
| | | | | | still pretty hacky because it doesn't compute the 3/4 markers correctly. llvm-svn: 38561
* Implement a new type of FileID: FileIDInfo::MacroExpansion. For tokens thatChris Lattner2006-06-211-3/+0
| | | | | | | | | came from a macro expansion, this allows us to keep track of both where the character data came from and where the logical position of the token is (at the expansion site). This implements Preprocessor/indent_macro.c, and reduces the number of cpp iostream -E diffs vs GCC from 2589 to 2297. llvm-svn: 38557
* Rename LexerToken::getSourceLocation -> getLocationChris Lattner2006-06-181-17/+13
| | | | llvm-svn: 38553
* Make a fundamental change to the way we represent the location of LexerToken's.Chris Lattner2006-06-181-21/+118
| | | | | | | | | | | | | | Now, instead of keeping a pointer to the start of the token in memory, we keep the start of the token as a SourceLocation node. This means that each LexerToken knows the full include stack it was created with, and means that the LexerToken isn't reliant on a "CurLexer" member to be around (lexer tokens would previously go out of scope when their lexers were deallocated). This simplifies several things, and forces good cleanup elsewhere. Now the Preprocessor is the one that knows how to dump tokens/macros and is the one that knows how to get the spelling of a token (it has all the context). llvm-svn: 38551
* Add missing returnChris Lattner2006-06-181-1/+1
| | | | llvm-svn: 38547
* Simplify an APIChris Lattner2006-06-181-3/+2
| | | | llvm-svn: 38541
* Remove manual conditional error handling code.Chris Lattner2006-06-181-130/+93
| | | | llvm-svn: 38540
* Initial checkin of c-language parserChris Lattner2006-06-181-0/+1121
llvm-svn: 38539
OpenPOWER on IntegriCloud