summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* This patch introduces declaration of getter methods for ObjC2'sFariborz Jahanian2008-05-073-10/+50
| | | | | | | properties. Couple of property tests will fail with this patch. Will fix them next. llvm-svn: 50818
* copy-paste: NS types are not typedefs.Ted Kremenek2008-05-071-7/+5
| | | | llvm-svn: 50817
* Fixup InitListExpr::child_begin/end. Thanks to Ted for catching the regression.Steve Naroff2008-05-071-2/+4
| | | | llvm-svn: 50816
* Fix off-by-one error.Steve Naroff2008-05-071-1/+1
| | | | llvm-svn: 50815
* Do not treat **instance** methods "copyWithZone:" and "mutableCopyWithZone:" ↵Ted Kremenek2008-05-071-18/+1
| | | | | | from NSObject as allocators. llvm-svn: 50802
* Diagnose attempts to use C++ default arguments outside of a function declarationDouglas Gregor2008-05-074-9/+46
| | | | llvm-svn: 50799
* Be less promiscuous with generating summaries for "new", "copy", "create".Ted Kremenek2008-05-071-3/+3
| | | | llvm-svn: 50798
* Added auto-summary generation for createXXX, copyXXX, newXXX methods.Ted Kremenek2008-05-071-16/+12
| | | | llvm-svn: 50795
* Don't report leaks for autoreleased objects.Ted Kremenek2008-05-061-42/+21
| | | | llvm-svn: 50777
* More comments.Ted Kremenek2008-05-061-73/+72
| | | | | | "#if 0" out some assumptions when auto-generating method summaries. llvm-svn: 50772
* Fix PR2101 - Codegen crash during bitfield initialization.Devang Patel2008-05-061-3/+29
| | | | llvm-svn: 50769
* Experiment with not converting bug names to lower case.Ted Kremenek2008-05-061-11/+38
| | | | llvm-svn: 50753
* More refactorings in GeneratePathDiagnostic: use ExecutionContinues to displayTed Kremenek2008-05-061-14/+28
| | | | | | "Execution continues..." message, which does a better job at handling corner cases. llvm-svn: 50751
* Patch to refactor setter/getter names of property attributes into SelectorFariborz Jahanian2008-05-063-2/+10
| | | | | | | (was IdentifierInfo * before). This will make method declartations whole lot easier. llvm-svn: 50747
* Generate "stop" summaries for selectors involving receivers whose type is ↵Ted Kremenek2008-05-061-19/+92
| | | | | | not NSxxxx. llvm-svn: 50721
* Use strncmp correctly.Ted Kremenek2008-05-061-3/+3
| | | | llvm-svn: 50715
* Make string comparison legible and remove buffer overrun introduced by typo.Ted Kremenek2008-05-061-2/+2
| | | | llvm-svn: 50714
* String comparison cleanups.Ted Kremenek2008-05-061-1/+1
| | | | | | Added test case. llvm-svn: 50711
* Fix logic error in string processing.Ted Kremenek2008-05-061-1/+1
| | | | llvm-svn: 50710
* Remove assertion.Ted Kremenek2008-05-061-1/+0
| | | | llvm-svn: 50709
* Use EvalSummary to process message expressions, thereby unifying the checkerTed Kremenek2008-05-061-135/+64
| | | | | | | | | | | | logic for function calls and message expressions. Use the following heuristic to infer "allocating" instance methods: [ClassName classWithXXX] allocates an object Update testcase to reflect this heuristic. llvm-svn: 50708
* Added receiver effects to EvalSummary.Ted Kremenek2008-05-061-7/+43
| | | | llvm-svn: 50700
* Expand summaries to include "Receiver" effects.Ted Kremenek2008-05-061-16/+40
| | | | llvm-svn: 50697
* simplify some builder calls.Chris Lattner2008-05-064-28/+15
| | | | llvm-svn: 50694
* remove a stray printoutChris Lattner2008-05-061-2/+0
| | | | llvm-svn: 50691
* Added initialization code to generate initial set of ObjC method summaries ↵Ted Kremenek2008-05-061-3/+22
| | | | | | (non-instance methods). llvm-svn: 50690
* Added code to generate initial set of summaries for instance methods.Ted Kremenek2008-05-061-17/+55
| | | | llvm-svn: 50689
* Several fixes to SemaInit.cpp. It's still not enabled (since it fails a few ↵Steve Naroff2008-05-062-33/+50
| | | | | | tests). Expect to enable it very soon. llvm-svn: 50688
* Add summary generation for "initXXX" methods.Ted Kremenek2008-05-051-5/+47
| | | | llvm-svn: 50684
* Make CF retain diagnostics more succinct.Ted Kremenek2008-05-051-4/+5
| | | | | | In a leak's "name", indicate GC or non-GC bugs. llvm-svn: 50680
* Emit dead store warnings for ++ and -- operators.Ted Kremenek2008-05-051-8/+24
| | | | llvm-svn: 50679
* Fix rdar://5905347 a crash on invalid builtin, due to theChris Lattner2008-05-051-4/+16
| | | | | | params not getting installed for builtins when synthesized. llvm-svn: 50676
* Initial work on refactoring the CFRefCount checker so that it is moreTed Kremenek2008-05-051-108/+184
| | | | | | generic and handles reference counts for NSObjects. llvm-svn: 50674
* Add support for -Wimplicit-function-declaration, rdar://5907433Chris Lattner2008-05-051-2/+3
| | | | llvm-svn: 50672
* Fix typo, improve comment.Chris Lattner2008-05-051-5/+6
| | | | llvm-svn: 50666
* Fix a few more bugs in preprocessor expressions w.r.t. ?:. Now I Chris Lattner2008-05-051-12/+24
| | | | | | think it is really right. :) This fixes PR2284. llvm-svn: 50665
* percolate @optional/@required protocols down to ASTs forFariborz Jahanian2008-05-054-4/+14
| | | | | | properties declared in the protocol. llvm-svn: 50662
* Improve leak diagnostics to not report a leak on the same line where Ted Kremenek2008-05-051-16/+80
| | | | | | | | | | | | | | | | the object was last used. This can be confusing to users. For example: // 'y' is leaked x = foo(y); instead: x = foo(y); // 'y' is leaked llvm-svn: 50661
* Improved leak diagnostics.Ted Kremenek2008-05-051-23/+63
| | | | llvm-svn: 50657
* Minor refactorings/cleanups in CF retain checker and added support for ↵Ted Kremenek2008-05-051-93/+68
| | | | | | | | NSMakeCollectable. Added test case for NSMakeCollectable. llvm-svn: 50653
* When reporting branch conditions that evaluate to an uninitialized value,Ted Kremenek2008-05-051-5/+77
| | | | | | | | | | highlight the most nested subexpression that appears most responsible (giving the user better diagnostic feedback). Updated test cases to illustrate this feature. Implements: <rdar://problem/5880443> llvm-svn: 50647
* Neil pointed out that clang doesn't generate ranges from diagnosticsChris Lattner2008-05-052-120/+192
| | | | | | | | | | | | | | | | | | | | | | | | related to pp-expressions. Doing so is pretty simple and this patch implements it, yielding nice diagnostics like: t.c:2:7: error: division by zero in preprocessor expression #if 1 / (0 + 0) ~ ^ ~~~~~~~ t.c:5:14: error: expected ')' in preprocessor expression #if (412 + 42 ~~~~~~~~^ t.c:5:5: error: to match this '(' #if (412 + 42 ^ t.c:10:10: warning: left side of operator converted from negative value to unsigned: -42 to 18446744073709551574 #if (-42 + 0U) / -2 ~~~ ^ ~~ t.c:10:16: warning: right side of operator converted from negative value to unsigned: -2 to 18446744073709551614 #if (-42 + 0U) / -2 ~~~~~~~~~~ ^ ~~ 5 diagnostics generated. llvm-svn: 50638
* fix a bug handling right associative operators that Neil noticed, hopefullyChris Lattner2008-05-051-14/+4
| | | | | | the final part of PR2279 llvm-svn: 50635
* ||/&& do not do UAC's either. This silences a bogus warning on #if -1 || 4U.Chris Lattner2008-05-041-4/+10
| | | | llvm-svn: 50632
* Neil points out that commas don't do UACs either.Chris Lattner2008-05-041-1/+1
| | | | llvm-svn: 50631
* Fix the rest of PR2279:Chris Lattner2008-05-041-4/+7
| | | | | | | | | a) correct rejection of ',' in pp expressions. b) the precedence of ',' was wrong w.r.t. ?:. Thanks again to Neil for finding these and providing testcases. llvm-svn: 50625
* Fix PR2279 part C: shifts don't perform the UACs, thanks to Neil Chris Lattner2008-05-041-2/+4
| | | | | | for pointing this out. llvm-svn: 50624
* use simplified API for making fp constants.Chris Lattner2008-05-042-6/+4
| | | | llvm-svn: 50623
* fix a nasty bug that Neil identifier in pp-expr parsing (this is PR2279 part D).Chris Lattner2008-05-041-5/+13
| | | | llvm-svn: 50617
* Simplify FunctionDecl::AddRedeclaration a bit by using std::swap.Chris Lattner2008-05-043-31/+51
| | | | | | | Fix 'swapping' of attributes to not insert null values into the DeclAttrs map. llvm-svn: 50612
OpenPOWER on IntegriCloud