summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CocoaConventions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Warn on missing [super finalize] calls.Nico Weber2011-08-281-0/+1
| | | | | | This matches gcc's logic. Second half of PR10661. llvm-svn: 138730
* Fix else style. No functionality change intended.Chad Rosier2011-08-171-2/+1
| | | | llvm-svn: 137896
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-11/+8
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* [analyzer] Per discussions with the Cocoa team, extend CF naming conventions ↵Ted Kremenek2011-07-161-2/+41
| | | | | | to extend to camel case functions instead of just title case functions. Fixes <rdar://problem/9732321>. llvm-svn: 135350
* [analyzer] Place checking for Core Foundation "Create" rule into a proper ↵Ted Kremenek2011-07-161-6/+11
| | | | | | API. No functionality change. llvm-svn: 135349
* Teach the static analyzer's interpretation of Cocoa conventions toDouglas Gregor2011-07-061-2/+4
| | | | | | | obey the objc_method_family attribute when provided. Fixes <rdar://problem/9726279>. llvm-svn: 134493
* Added a missing case label.Fariborz Jahanian2011-07-061-0/+1
| | | | llvm-svn: 134454
* Finish 2 sentences.Francois Pichet2011-06-161-1/+1
| | | | llvm-svn: 133214
* Implement Objective-C Related Result Type semantics.Douglas Gregor2011-06-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related result types apply Cocoa conventions to the type of message sends and property accesses to Objective-C methods that are known to always return objects whose type is the same as the type of the receiving class (or a subclass thereof), such as +alloc and -init. This tightens up static type safety for Objective-C, so that we now diagnose mistakes like this: t.m:4:10: warning: incompatible pointer types initializing 'NSSet *' with an expression of type 'NSArray *' [-Wincompatible-pointer-types] NSSet *array = [[NSArray alloc] init]; ^ ~~~~~~~~~~~~~~~~~~~~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1: note: instance method 'init' is assumed to return an instance of its receiver type ('NSArray *') - (id)init; ^ It also means that we get decent type inference when writing code in Objective-C++0x: auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil]; // ^ now infers NSMutableArray* rather than id llvm-svn: 132868
* Move some of the logic about classifying Objective-C methods intoJohn McCall2011-03-021-74/+18
| | | | | | | | conventional categories into Basic and AST. Update the self-init checker to use this logic; CFRefCountChecker is complicated enough that I didn't want to touch it. llvm-svn: 126817
* Change QualType::getTypePtr() to return a const pointer, then change aJohn McCall2011-01-191-1/+1
| | | | | | thousand other things which were (generally inadvertantly) relying on that. llvm-svn: 123814
* [analyzer] Add 'bool ignorePrefix' parameter to ↵Argyrios Kyrtzidis2011-01-111-1/+6
| | | | | | | | | | | cocoa::deriveNamingConvention to control whether the prefix should be ignored. E.g. if ignorePrefix is true, "_init" and "init" selectors will both be result in InitRule, but if ignorePrefix is false, only "init" will return InitRule. llvm-svn: 123262
* Rename static analyzer namespace 'GR' to 'ento'.Ted Kremenek2010-12-231-1/+1
| | | | llvm-svn: 122492
* [analyzer] Refactoring: Move stuff into namespace 'GR'.Argyrios Kyrtzidis2010-12-221-0/+1
| | | | llvm-svn: 122423
* Fix assertion failure in cocoa::deriveNamingConvention()Ted Kremenek2010-12-171-4/+6
| | | | | | when the selector is the string 'mutable'. llvm-svn: 122046
* Move CocoaConventions.[h,cpp] from libCheckerTed Kremenek2010-12-171-0/+172
to libAnalysis. Similar to Format (format string checking), CocoaConventions has the potential to serve clients other than the static analyzer. llvm-svn: 122040
OpenPOWER on IntegriCloud