summaryrefslogtreecommitdiffstats
path: root/clang/Lex
Commit message (Collapse)AuthorAgeFilesLines
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-1516-7673/+0
| | | | | | | | | | lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
* Make the preprocessor own its PPCallbacks, fixing a memory leak.Chris Lattner2008-03-141-0/+2
| | | | | | Patch by Sam Bishop! llvm-svn: 48357
* Add some missing #includes for GCC mainline, patch by Shantonu Sen!Chris Lattner2008-03-101-0/+1
| | | | llvm-svn: 48153
* add comments about some simple optimizations that may become Chris Lattner2008-03-101-0/+18
| | | | | | more important if this api gets wider use. llvm-svn: 48131
* implement simple support for arbitrary token lookahead. Change the Chris Lattner2008-03-103-12/+74
| | | | | | | | objc @try parser to use it, fixing a FIXME. Update the objc-try-catch-1.m file to pass now that we get more reasonable errors. llvm-svn: 48129
* improve comment.Chris Lattner2008-03-091-1/+1
| | | | llvm-svn: 48083
* move PP::LookupFile from PPLexerChange -> PPDirectives.cppChris Lattner2008-03-092-48/+48
| | | | llvm-svn: 48082
* Move a bunch more code out of Preprocessor.cpp into PPLexerChange.cppChris Lattner2008-03-092-353/+373
| | | | llvm-svn: 48080
* split macro expansion support out of Preprocessor.cpp into PPMacroExpansion.cppChris Lattner2008-03-093-508/+524
| | | | | | | Rename Directives.cpp -> PPDirectives.cpp since it implements part of the Preprocessor class. llvm-svn: 48078
* rename HandleEndOfMacro -> HandleEndOfTokenLexerChris Lattner2008-03-092-7/+7
| | | | llvm-svn: 48076
* split the MacroArgs class out of TokenLexer.cpp/h intoChris Lattner2008-03-094-213/+337
| | | | | | MacroArgs.cpp/h llvm-svn: 48075
* rename some MacroExpander-related ivars to TokenLexer.Chris Lattner2008-03-092-36/+36
| | | | llvm-svn: 48073
* Rename MacroExpander.cpp/h -> TokenLexer.cpp/hChris Lattner2008-03-091-1/+1
| | | | llvm-svn: 48072
* rename the MacroExpander class to TokenLexer. It handles bothChris Lattner2008-03-092-20/+21
| | | | | | token streams and macro lexing, so a more generic name is useful. llvm-svn: 48071
* rename MacroTokens -> Tokens. When this is a token stream, there is no macroChris Lattner2008-03-091-30/+30
| | | | | | involved. llvm-svn: 48070
* split preprocesor directive handling out of Preprocessor.cpp into Directives.cppChris Lattner2008-03-092-1083/+1105
| | | | llvm-svn: 48068
* remove the source location arguments to various target query methods.Chris Lattner2008-03-052-26/+11
| | | | llvm-svn: 47954
* Remove the first layer of support for "portability" warnings. This is Chris Lattner2008-03-053-98/+4
| | | | | | | | | | | | | | | theoretically useful, but not useful in practice. It adds a bunch of complexity, and not much value. It's best to nuke it. One big advantage is that it means the target interfaces will soon lose their SLoc arguments and target queries can never emit diagnostics anymore (yay). Removing this also simplifies some of the core preprocessor which should make it slightly faster. Ted, I didn't simplify TripleProcessor, which can now have at most one triple, and can probably just be removed. Please poke at it when you have time. llvm-svn: 47930
* clarify comment, this is undefined behavior in any case, even if it onlyChris Lattner2008-02-251-30/+10
| | | | | | bits VC++ right now. llvm-svn: 47565
* Revert an incorrect part of my previuos patch.Lauro Ramos Venancio2008-02-251-1/+1
| | | | llvm-svn: 47553
* Fix PR2086.Lauro Ramos Venancio2008-02-251-13/+18
| | | | llvm-svn: 47551
* Fix PR2090, a typo in digraph processing.Chris Lattner2008-02-241-1/+1
| | | | llvm-svn: 47540
* Two more Windows-related fixes:Ted Kremenek2008-02-241-2/+32
| | | | | | | | | | | | | | - More enum signeness bitfield fixes (MSVC treats enums as signed). - Fixed in Lex/HeaderSearch.cpp an unsafe copy between two HeaderSearch::PerFileInfo entries in a common vector. The copy involved two calls to getFileInfo() within the assignment; these calls could have side-effects that enlarged the internal vector, and with MSVC this would invalidate one of the values in the assignment. Patch by Argiris Kirtzidis! llvm-svn: 47536
* Fix CheckEndOfDirective to diagnose lines that contain macros that expand to Chris Lattner2008-02-161-2/+5
| | | | | | | zero tokens. This fixes PR2045, thanks to Neil for finding another incredibly subtle corner case :) llvm-svn: 47203
* Adjust for APInt's isPositive being renamed to isNonNegative.Dan Gohman2008-02-131-6/+6
| | | | llvm-svn: 47091
* Move Microsoft __declspec hack from the parser to the preprocessor. Since we ↵Steve Naroff2008-02-111-0/+1
| | | | | | have no plans to actually implement this construct, it is cleaner to limit the change to the preprocessor. llvm-svn: 46973
* long is 32-bit is on win32.Chris Lattner2008-02-101-1/+1
| | | | llvm-svn: 46935
* - Add support for fuzzy parsing line-oriented __asm's (yuck).Steve Naroff2008-02-071-0/+1
| | | | | | - Change handling of __w64 to a built-in macro. llvm-svn: 46864
* Minor cleanup from yesterday's -fms-extension commit. Move __int* MS ↵Steve Naroff2008-02-071-0/+4
| | | | | | keywords to predefined macros. This removes some of the MS-madness from Parser::ParseDeclarationSpecifiers(). llvm-svn: 46852
* Implement support for the extremely atrocious MS /##/ extension, Chris Lattner2008-02-072-6/+103
| | | | | | | which pastes together a comment. This is only enabled with -fms-extensions of course. llvm-svn: 46845
* Implement -fms-extensions. This allows us to fuzzy parse non-standard MS ↵Steve Naroff2008-02-071-1/+7
| | | | | | constructs used in "windows.h". llvm-svn: 46838
* Fix PR1969. stdin has no FileEntry.Chris Lattner2008-02-012-8/+11
| | | | llvm-svn: 46629
* Fix a bug where we would incorrectly emit a "cannot paste" error Chris Lattner2008-01-291-1/+16
| | | | | | | message when handling the GNU ", ## __VA_ARGS__" extension. While I'm at it, flag uses of this as extensions. llvm-svn: 46503
* Change the location we return for the EOF token to actually be on the lastChris Lattner2008-01-251-2/+18
| | | | | | line of the file, in the common case where a file ends with a newline. llvm-svn: 46335
* add support for -Wundef.Chris Lattner2008-01-231-0/+1
| | | | llvm-svn: 46274
* Fix PR1936, a crash on malformed #if. Thanks to Neil forChris Lattner2008-01-221-2/+2
| | | | | | noticing this! llvm-svn: 46256
* Change uses of std::cerr/std::cout to llvm::Lcerr/llvm::cout, and removeTed Kremenek2008-01-141-38/+38
| | | | | | | | #include<iostream>. Patch provided by Sam Bishop. llvm-svn: 45962
* Fix a nasty corner case that Neil noticed in PR1900, where we would Chris Lattner2008-01-071-0/+4
| | | | | | | | | | | | incorrectly apply the multiple include optimization to files with guards like: #if !defined(x) MACRO where MACRO could expand to different things in different contexts. Thanks Neil! llvm-svn: 45716
* Fix typoNate Begeman2008-01-071-1/+1
| | | | llvm-svn: 45682
* simplify the lexer a bit, pulling stuff out of the default case.Chris Lattner2008-01-031-19/+27
| | | | llvm-svn: 45540
* remove attribution from makefiles.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45412
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-2910-20/+20
| | | | | | discussion of this change. llvm-svn: 45410
* Converted uses of scoped_ptr to OwningPtr.Ted Kremenek2007-12-201-2/+2
| | | | llvm-svn: 45265
* Interned MainFileID within SourceManager. Since SourceManager is referenced byTed Kremenek2007-12-191-1/+4
| | | | | | | | | both Preprocessor and ASTContext, we no longer need to explicitly pass MainFileID around in function calls that also pass either Preprocessor or ASTContext. This resulted in some nice cleanups in the ASTConsumers and the driver. llvm-svn: 45228
* Add support for #pragma mark, which shouldn't warn about bogus tokens.Chris Lattner2007-12-191-0/+20
| | | | llvm-svn: 45212
* implement HeaderMap::LookupFile. I think headermaps are done now. All that is Chris Lattner2007-12-171-2/+55
| | | | | | left is this crazy thing called "testing". llvm-svn: 45124
* implement enough helper functions to successfully dump out the Chris Lattner2007-12-171-7/+105
| | | | | | | contents of the header map. Look ma, no assumptions about input data here (aka, corrupt header maps can't crash the compiler - crazy thought). llvm-svn: 45122
* simplify some code, using new scoped_ptr support. Fix a bug in the Chris Lattner2007-12-171-11/+10
| | | | | | | | cross-endianness case, where we checked the version in the wrong endianness. Amusingly, the GCC logic that detects mixed endianness hmaps and rejects them is dead for this very reason. llvm-svn: 45113
* Finish hooking up the scaffolding for headermaps. They can now do everythingChris Lattner2007-12-171-5/+18
| | | | | | except resolve lookups. llvm-svn: 45111
* Start reading the headermap header, drop the 'errorstr' argument toChris Lattner2007-12-172-5/+54
| | | | | | the create method. llvm-svn: 45109
OpenPOWER on IntegriCloud