summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Change CheckIncrementDecrementOperand to test for common cases firstChris Lattner2008-11-211-21/+24
| | | | | | and fall through better. llvm-svn: 59799
* move the diagnostic location and ID out of DiagnosticInfo and store it inChris Lattner2008-11-211-8/+13
| | | | | | | | | | the Diagnostic class. Since we can already only have one diagnostic in flight at a time, this shrinks DiagnosticInfo. This reduces DiagnosticInfo to being basically a rather crazy smart pointer to a DiagnosticInfo :) llvm-svn: 59798
* move diagnostic insertion methods to be free methods instead ofChris Lattner2008-11-211-38/+41
| | | | | | | | in the DiagnosticInfo class. This requires marking them as taking a const DiagnosticInfo, which is bogus (they logically mutate DI), but works with the C++ type system. llvm-svn: 59797
* testcase for PR3096Chris Lattner2008-11-211-0/+5
| | | | llvm-svn: 59794
* Cleanup memory management in overloading of operator->, slightlyDouglas Gregor2008-11-211-8/+9
| | | | llvm-svn: 59791
* Don't print canonical types in overloading-related diagnosticsDouglas Gregor2008-11-214-10/+32
| | | | llvm-svn: 59789
* Change -verify mode to find the "expected-error" and "expected-warning" stringsChris Lattner2008-11-212-22/+15
| | | | | | | | with a raw lexer instead of a PP lexer. This means that -verify doesn't scan #include'd headers for expected-error/warning strings, and it also means that it doesn't ignore them in #if 0. llvm-svn: 59774
* Add comment to IsFileLexer, clean up indentation, and tighten how it's written.Ted Kremenek2008-11-211-6/+4
| | | | llvm-svn: 59773
* remove expected-error from #if 0 section of code.Chris Lattner2008-11-211-2/+2
| | | | llvm-svn: 59772
* disable expected-errors in #if parts of the test.Chris Lattner2008-11-211-3/+3
| | | | llvm-svn: 59771
* split into two tests.Chris Lattner2008-11-212-10/+7
| | | | llvm-svn: 59770
* PTHLexer:Ted Kremenek2008-11-212-14/+28
| | | | | | - Move out logic for handling the end-of-file to LexEndOfFile (to match the Lexer) class. The logic now mirrors the Lexer class more, which allows us to pass most of the Preprocessor test cases. llvm-svn: 59768
* Consolidated @try and @synchronize into a singleFariborz Jahanian2008-11-214-119/+45
| | | | | | code gen. method. llvm-svn: 59767
* Add checker test case: warn about returning an uninitialized value to the ↵Ted Kremenek2008-11-211-0/+7
| | | | | | caller. llvm-svn: 59765
* - Clean up transfer function logic for 'return' statements.Ted Kremenek2008-11-213-38/+47
| | | | | | - Add check for returning an undefined value to a caller. llvm-svn: 59764
* Enable test file for 'region store' in addition to basic store.Ted Kremenek2008-11-211-1/+2
| | | | llvm-svn: 59762
* Support generation of objc_assign_ivar for ivarFariborz Jahanian2008-11-202-3/+19
| | | | | | write-barriers. llvm-svn: 59748
* PTHLexer:Ted Kremenek2008-11-202-1/+13
| | | | | | | - Move PTHLexer::GetToken() to be inside PTHLexer.cpp. - When lexing in raw mode, null out identifiers. llvm-svn: 59744
* __weak ivar need not warn.Fariborz Jahanian2008-11-202-1/+12
| | | | llvm-svn: 59743
* Introducing objc_assign_ivar to clang.Fariborz Jahanian2008-11-203-0/+33
| | | | llvm-svn: 59740
* Added a test case for __weak field decls. Change SetVarDeclObjCAttributeFariborz Jahanian2008-11-203-10/+22
| | | | | | to static function. Added comments. llvm-svn: 59738
* Handle another case where we should use PTHLexer as an alternative to the ↵Ted Kremenek2008-11-201-1/+3
| | | | | | normal Lexer. llvm-svn: 59736
* Update C++ statusDouglas Gregor2008-11-201-1/+1
| | | | llvm-svn: 59735
* PTHLexer:Ted Kremenek2008-11-202-24/+30
| | | | | | | | | | - Rename 'CurToken' and 'LastToken' to 'CurTokenIdx' and 'LastTokenIdx' respectively. - Add helper methods GetToken(), AdvanceToken(), AtLastToken() to abstract away details of the token stream. This also allows us to easily replace their implementation later. llvm-svn: 59733
* Add support for overloaded operator-> when used in a member accessDouglas Gregor2008-11-205-0/+106
| | | | | | expression (smart_ptr->mem). llvm-svn: 59732
* Rename IsNonPragmaNonMacroLexer to IsFileLexer.Ted Kremenek2008-11-203-12/+12
| | | | llvm-svn: 59731
* Output 'ANALYZE' messages to standard error. This should address the ↵Ted Kremenek2008-11-201-2/+2
| | | | | | intermixing of 'ANALYZE' and the other diagnostics the clang driver emits to standard error. llvm-svn: 59730
* Fix strange quote charactersDouglas Gregor2008-11-201-4/+4
| | | | llvm-svn: 59729
* De-unionize fields in Token class.Daniel Dunbar2008-11-201-25/+25
| | | | | | | | | | | | - This is fairly gross but although the code is conceptually the same, introducting the union causes gcc 4.2 on x86 (darwin, if that matters) to pessimize LexTokenInternal which is critical to our preprocessor performance. This speeds up -Eonly lexing of Cocoa.h by ~4.7% in my timings and reduces the code size of LexTokenInternal by 8.6%. llvm-svn: 59725
* Rewrote PTHLexer::Lex by digging through the sources of Lexer again. Now we ↵Ted Kremenek2008-11-201-28/+37
| | | | | | can do basic macro expansion using the PTHLexer. llvm-svn: 59724
* Add ugly "test harness" for PTHLexer that is not enabled by default. TheTed Kremenek2008-11-201-6/+49
| | | | | | | | | | (temporary hack) to test the PTHLexer is that whenever we would create a Lexer object we instead raw lex a memory buffer first and then use the PTHLexer. This logic exists only to driver the PTHLexer and will be removed/changed in the future. Note that the regular path using normal Lexer objects is what is used by default. llvm-svn: 59723
* Added virtual method 'IndirectLex' to PTHLexer. This will likely get ↵Ted Kremenek2008-11-201-0/+4
| | | | | | removed in the future when we correctly handle #include processing. llvm-svn: 59722
* Preprocessor::isCurrentLexer() now takes a PreprocessorLexer* argument to ↵Ted Kremenek2008-11-201-2/+2
| | | | | | match against CurPPLexer instead of CurLexer. llvm-svn: 59721
* Daniel really really likes = instead of += :)Chris Lattner2008-11-202-2/+2
| | | | llvm-svn: 59716
* remove the last old-fashioned Diag method. Transition complete!Chris Lattner2008-11-209-89/+79
| | | | llvm-svn: 59714
* remove another old Diag method.Chris Lattner2008-11-205-52/+43
| | | | llvm-svn: 59713
* remove another old-school Diag method.Chris Lattner2008-11-2011-125/+109
| | | | llvm-svn: 59712
* remove the type_info identifier cache. Compared to the costChris Lattner2008-11-203-17/+7
| | | | | | | | | | | of doing the lookup_decl, the hash lookup is cheap. Also, typeid doesn't happen enough in real world code to worry about it. I'd like to eventually get rid of KnownFunctionIDs from Sema also, but today is not that day. llvm-svn: 59711
* compared to the rest of the code in Sema::GetStdNamespace(),Chris Lattner2008-11-203-3/+2
| | | | | | | looking up the "std" identifier is trivial. Just do it, particularly since this is only done if the namespace hasn't already been looked up. llvm-svn: 59710
* remove some other identifiers that are looked up really early and onlyChris Lattner2008-11-203-15/+15
| | | | | | used in one cold place. llvm-svn: 59709
* instead of looking up super at startup time, Chris Lattner2008-11-204-7/+2
| | | | | | | just check for it when needed. It doesn't incur real cost in any hot paths. llvm-svn: 59708
* Rename IdentifierInfo::isName to ::isStr. Use a nifty trickChris Lattner2008-11-205-19/+20
| | | | | | | from Sebastian to enforce that a literal string is passed in, and use this to avoid having to call strlen on it. llvm-svn: 59706
* Make FIXME a hard assertion.Ted Kremenek2008-11-201-2/+6
| | | | llvm-svn: 59695
* Preprocessor::getCurrentFileLexer() now returns a PreprocessorLexer* instead ofTed Kremenek2008-11-202-6/+7
| | | | | | | a Lexer*. This means it will either return the current (normal) file Lexer or a PTHLexer. llvm-svn: 59694
* Just use the SourceLocation of SysHeaderTok when doing a callback to emit #lineTed Kremenek2008-11-201-2/+2
| | | | | | | information. A diff of the -E output for Cocoa.h shows that there is no change in output. llvm-svn: 59693
* Assign the result of getCurrentFileLexer() to a PreprocessorLexer* instead ↵Ted Kremenek2008-11-201-1/+1
| | | | | | of Lexer* (narrower interface). llvm-svn: 59691
* - Default initialize ParsingPreprocessorDirective, ParsingFilename, andTed Kremenek2008-11-204-34/+28
| | | | | | | | LexingRawMode in the ctor of PreprocessorLexer. - PTHLexer: Use "LastToken" instead of "NumToken" llvm-svn: 59690
* Add (untested) implementation of PTHLexer::isNextPPTokenLParen() and ↵Ted Kremenek2008-11-201-4/+14
| | | | | | PTHLexer::DiscardToEndOfLine(). llvm-svn: 59687
* Use ScheduleDAGSDNodes.h instead of ScheduleDAG.h (stuff moved around).Ted Kremenek2008-11-201-1/+1
| | | | llvm-svn: 59684
* Split region store specific test cases.Zhongxing Xu2008-11-202-17/+17
| | | | llvm-svn: 59683
OpenPOWER on IntegriCloud