summaryrefslogtreecommitdiffstats
path: root/clang/Basic/SourceManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Tolerate conditions where there is no line #Chris Lattner2006-07-021-1/+3
| | | | llvm-svn: 38604
* Eliminate SourceManager::createFileIDForMacroExp, inlining it into its ↵Chris Lattner2006-06-301-16/+8
| | | | | | single use. llvm-svn: 38599
* Expose a useful helper method.Chris Lattner2006-06-301-0/+14
| | | | llvm-svn: 38596
* Factor logical line lookup better.Chris Lattner2006-06-291-28/+7
| | | | llvm-svn: 38594
* Due to generated tokens expanded by macros, there can be multiple ↵Chris Lattner2006-06-291-6/+9
| | | | | | MacroExpansion fileid's, loop over them until we get to something real. llvm-svn: 38590
* Fix Preprocessor/macro_expandloc2.cChris Lattner2006-06-261-0/+17
| | | | llvm-svn: 38579
* To not treat macro invocation locations as part of the include stackChris Lattner2006-06-261-0/+12
| | | | | | when reporting a diagnostic. llvm-svn: 38577
* Implement a new SourceManager::getSourceName methodChris Lattner2006-06-211-10/+28
| | | | llvm-svn: 38560
* Update SourceManager::getLineNumber to return the correct line # for macroChris Lattner2006-06-211-1/+10
| | | | | | instantiations. llvm-svn: 38558
* Implement a new type of FileID: FileIDInfo::MacroExpansion. For tokens thatChris Lattner2006-06-211-2/+32
| | | | | | | | | 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
* Modify SourceManager to make way for future macro locations and #line supportChris Lattner2006-06-201-4/+5
| | | | | | no functionality change yet llvm-svn: 38556
* Make a fundamental change to the way we represent the location of LexerToken's.Chris Lattner2006-06-181-0/+10
| | | | | | | | | | | | | | 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
* Initial checkin of c-language parserChris Lattner2006-06-181-0/+213
llvm-svn: 38539
OpenPOWER on IntegriCloud