summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add out-of-bound memory access warning report code.Zhongxing Xu2008-11-232-4/+28
| | | | llvm-svn: 59903
* Clean up code by using utility methods.Zhongxing Xu2008-11-231-11/+7
| | | | llvm-svn: 59899
* Return false if we encounter a type we can't handle.Anders Carlsson2008-11-221-1/+2
| | | | llvm-svn: 59889
* An expression is not foldable if it can't be fully evaluated. Fixes PR3060Anders Carlsson2008-11-221-2/+4
| | | | llvm-svn: 59887
* Implemented ir-gen for 'implicit' properties using the new AST nodes.Fariborz Jahanian2008-11-226-14/+96
| | | | llvm-svn: 59886
* Case values must be evaluatedAnders Carlsson2008-11-222-21/+28
| | | | llvm-svn: 59884
* Use Expr::Evaluate for case statements. Fixes PR2525Anders Carlsson2008-11-224-17/+44
| | | | llvm-svn: 59881
* remove a dead enumChris Lattner2008-11-222-2/+0
| | | | llvm-svn: 59879
* Support for implicit property assignment. Error assigning toFariborz Jahanian2008-11-223-4/+48
| | | | | | 'implicit' property with no 'setter'. llvm-svn: 59878
* New AST node to access "implicit" setter/getter using property dor syntax.Fariborz Jahanian2008-11-229-89/+85
| | | | | | | Issuing diagnostics when assigning to read-only properties. This is work in progress. llvm-svn: 59874
* Implement a %plural modifier for complex plural forms in diagnostics. Use it ↵Sebastian Redl2008-11-224-28/+141
| | | | | | in the overload diagnostics. llvm-svn: 59871
* Remove debug code.Zhongxing Xu2008-11-221-1/+1
| | | | llvm-svn: 59870
* Initial support for checking out of bound memory access. Only support Zhongxing Xu2008-11-225-2/+81
| | | | | | ConcreteInt index for now. llvm-svn: 59869
* remove some more old Diag methods, replace with a single static helper functionChris Lattner2008-11-221-24/+23
| | | | llvm-svn: 59868
* move the Diag method for Sema to be inline. This shrinks the release-assertsChris Lattner2008-11-222-8/+11
| | | | | | | | | clang executable (when built with gcc 4.2 on the mac) from 14519740 to 14495028 bytes. This shrinks individual object files as well: SemaChecking from 23580->22248, SemaDeclObjc from 61368->57376, SemaExpr from 115628->110516, as well as several others. llvm-svn: 59867
* Fix a weird inconsistency with hex floats. Previously the lexer Chris Lattner2008-11-222-5/+3
| | | | | | | | | would not eat the "-1" in "0x0p-1", but LiteralSupport would accept it when extensions are on. This caused strangeness and failures when hexfloats were properly treated as an extension (not error) in LiteralSupport. llvm-svn: 59865
* remove the NumericLiteralParser::Diag helper method, inlining it intoChris Lattner2008-11-221-29/+32
| | | | | | | | its call sites. This makes it more explicit when the hasError flag is getting set and removes a confusing difference in behavior between PP.Diag and Diag in this code. llvm-svn: 59863
* Move the Preprocessor::Diag methods inline. This has the interestingChris Lattner2008-11-221-12/+0
| | | | | | | | | | | | | | | | (and carefully calculated) effect of allowing the compiler to reason about the aliasing properties of DiagnosticBuilder object better, allowing the whole thing to be promoted to registers instead of resulting in a ton of stack traffic. While I'm not very concerned about the performance of the Diag() method invocations, I *am* more concerned about their code size and impact on the non-diagnostic code. This patch shrinks the clang executable (in release-asserts mode with gcc-4.2) from 14523980 to 14519816 bytes. This isn't much, but it shrinks the lexer from 38192 to 37776, PPDirectives.o from 31116 to 28868 bytes, etc. llvm-svn: 59862
* inline a method into its only two call sites.Chris Lattner2008-11-221-2/+3
| | | | llvm-svn: 59860
* actually, this version isn't really needed.Chris Lattner2008-11-221-6/+2
| | | | llvm-svn: 59859
* remove a sneaky version of Diag hiding in PreprocessorLexer.Chris Lattner2008-11-222-10/+7
| | | | llvm-svn: 59858
* Use tryEvaluate for constant exprs.Anders Carlsson2008-11-221-2/+13
| | | | llvm-svn: 59857
* Change the Lexer::Diag method to not magically silence warnings,Chris Lattner2008-11-222-29/+46
| | | | | | | force the caller to check instead. This eliminates the need (and the risk!) of weird null DiagnosticBuilder's floating around. llvm-svn: 59856
* Teach tentative parsing to handle block pointers (rdar://6394309)Chris Lattner2008-11-221-1/+2
| | | | llvm-svn: 59853
* Split the DiagnosticInfo class into two disjoint classes:Chris Lattner2008-11-226-15/+17
| | | | | | | | | | one for building up the diagnostic that is in flight (DiagnosticBuilder) and one for pulling structured information out of the diagnostic when formatting and presenting it. There is no functionality change with this patch. llvm-svn: 59849
* In PTHLexer::DiscardToEndOfLine() use Lex() instead of AdvanceToken(). This ↵Ted Kremenek2008-11-211-1/+2
| | | | | | handles transitions in the preprocessor state. llvm-svn: 59845
* Reenable the default lexer.Ted Kremenek2008-11-211-1/+1
| | | | llvm-svn: 59843
* When creating the raw tokens for PTHLexer, make sure the token representing ↵Ted Kremenek2008-11-211-1/+4
| | | | | | the file to include is checked for being an identifier. llvm-svn: 59842
* When creating raw tokens for the PTHLexer specially handle angled strings ↵Ted Kremenek2008-11-211-6/+30
| | | | | | for #include directives. llvm-svn: 59840
* Fixed bugzilla bug# 3095 related to code gen. for @synchronized.Fariborz Jahanian2008-11-211-7/+11
| | | | llvm-svn: 59838
* Implementation of new and delete parsing and sema.Sebastian Redl2008-11-2110-25/+643
| | | | | | This version uses VLAs to represent arrays. I'll try an alternative way next, but I want this safe first. llvm-svn: 59835
* merge some simple call diagnostics.Chris Lattner2008-11-213-23/+19
| | | | llvm-svn: 59831
* print a type in a diagnostic.Chris Lattner2008-11-211-2/+2
| | | | llvm-svn: 59829
* Fields of ivars of struct types are considered ivarsFariborz Jahanian2008-11-212-4/+9
| | | | | | themselves for gc API generation purposes. llvm-svn: 59828
* reapply the (corrected) patch to use the new llvm intrinsics for ↵Chris Lattner2008-11-212-26/+10
| | | | | | memcpy/memmove etc. llvm-svn: 59824
* Allow redeclaration of typedefs in C++Douglas Gregor2008-11-211-1/+8
| | | | llvm-svn: 59822
* temporarily revert Sangiv's patch.Chris Lattner2008-11-212-4/+25
| | | | llvm-svn: 59821
* Tiny fix to the parsing of linkage-specificationsDouglas Gregor2008-11-212-4/+4
| | | | llvm-svn: 59820
* Fix overloading of non-static member functions that differ in their ↵Douglas Gregor2008-11-211-1/+1
| | | | | | cv-qualifiers llvm-svn: 59819
* Enable some more operator overloading tests, and don't look into an ↵Douglas Gregor2008-11-211-0/+3
| | | | | | identifier for functions that might not have one llvm-svn: 59818
* mem[cpy,set,move] intrinsics are now overloaded.Sanjiv Gupta2008-11-212-25/+4
| | | | llvm-svn: 59806
* merge 3 more diagnostics into 1.Chris Lattner2008-11-211-5/+6
| | | | llvm-svn: 59805
* Add the concept of "modifiers" to the clang diagnostic format Chris Lattner2008-11-212-48/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strings. This allows us to have considerable flexibility in how these things are displayed and provides extra information that allows us to merge away diagnostics that are very similar. Diagnostic modifiers are a string of characters with the regex [-a-z]+ that occur between the % and digit. They may optionally have an argument that can parameterize them. For now, I've added two example modifiers. One is a very useful tool that allows you to factor commonality across diagnostics that need single words or phrases combined. Basically you can use %select{a|b|c}4 with with an integer argument that selects either a/b/c based on an integer value in the range [0..3). The second modifier is also an integer modifier, aimed to help English diagnostics handle plurality. "%s3" prints to 's' if integer argument #3 is not 1, otherwise it prints to nothing. I'm fully aware that 's' is an English concept and doesn't apply to all situations (mouse vs mice). However, this is very useful and we can add other crazy modifiers once we add support for polish! ;-) I converted a couple C++ diagnostics over to use this as an example, I'd appreciate it if others could merge the other likely candiates. If you have other modifiers that you want, lets talk on cfe-dev. llvm-svn: 59803
* Change CheckIncrementDecrementOperand to test for common cases firstChris Lattner2008-11-211-21/+24
| | | | | | and fall through better. llvm-svn: 59799
* 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-212-7/+27
| | | | llvm-svn: 59789
* PTHLexer:Ted Kremenek2008-11-211-14/+26
| | | | | | - 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
* - Clean up transfer function logic for 'return' statements.Ted Kremenek2008-11-212-38/+38
| | | | | | - Add check for returning an undefined value to a caller. llvm-svn: 59764
* Support generation of objc_assign_ivar for ivarFariborz Jahanian2008-11-202-3/+19
| | | | | | write-barriers. llvm-svn: 59748
OpenPOWER on IntegriCloud