- Dec 22, 2010
-
-
Argyrios Kyrtzidis authored
[analyzer] Refactoring: Move checkers into lib/GR/Checkers and their own library, libclangGRCheckers llvm-svn: 122422
-
Argyrios Kyrtzidis authored
llvm-svn: 122421
-
Argyrios Kyrtzidis authored
llvm-svn: 122420
-
- Dec 02, 2010
-
-
John McCall authored
into the latter. llvm-svn: 120643
-
- May 19, 2010
-
-
Ted Kremenek authored
llvm-svn: 104135
-
- Apr 21, 2010
-
-
Douglas Gregor authored
expressions, to improve source-location information, clarify the actual receiver of the message, and pave the way for proper C++ support. The ObjCMessageExpr node represents four different kinds of message sends in a single AST node: 1) Send to a object instance described by an expression (e.g., [x method:5]) 2) Send to a class described by the class name (e.g., [NSString method:5]) 3) Send to a superclass class (e.g, [super method:5] in class method) 4) Send to a superclass instance (e.g., [super method:5] in instance method) Previously these four cases where tangled together. Now, they have more distinct representations. Specific changes: 1) Unchanged; the object instance is represented by an Expr*. 2) Previously stored the ObjCInterfaceDecl* referring to the class receiving the message. Now stores a TypeSourceInfo* so that we know how the class was spelled. This both maintains typedef information and opens the door for more complicated C++ types (e.g., dependent types). There was an alternative, unused representation of these sends by naming the class via an IdentifierInfo *. In practice, we either had an ObjCInterfaceDecl *, from which we would get the IdentifierInfo *, or we fell into the case below... 3) Previously represented by a class message whose IdentifierInfo * referred to "super". Sema and CodeGen would use isStr("super") to determine if they had a send to super. Now represented as a "class super" send, where we have both the location of the "super" keyword and the ObjCInterfaceDecl* of the superclass we're targetting (statically). 4) Previously represented by an instance message whose receiver is a an ObjCSuperExpr, which Sema and CodeGen would check for via isa<ObjCSuperExpr>(). Now represented as an "instance super" send, where we have both the location of the "super" keyword and the ObjCInterfaceDecl* of the superclass we're targetting (statically). Note that ObjCSuperExpr only has one remaining use in the AST, which is for "super.prop" references. The new representation of ObjCMessageExpr is 2 pointers smaller than the old one, since it combines more storage. It also eliminates a leak when we loaded message-send expressions from a precompiled header. The representation also feels much cleaner to me; comments welcome! This patch attempts to maintain the same semantics we previously had with Objective-C message sends. In several places, there are massive changes that boil down to simply replacing a nested-if structure such as: if (message has a receiver expression) { // instance message if (isa<ObjCSuperExpr>(...)) { // send to super } else { // send to an object } } else { // class message if (name->isStr("super")) { // class send to super } else { // send to class } } with a switch switch (E->getReceiverKind()) { case ObjCMessageExpr::SuperInstance: ... case ObjCMessageExpr::Instance: ... case ObjCMessageExpr::SuperClass: ... case ObjCMessageExpr::Class:... } There are quite a few places (particularly in the checkers) where send-to-super is effectively ignored. I've placed FIXMEs in most of them, and attempted to address send-to-super in a reasonable way. This could use some review. llvm-svn: 101972
-
- Apr 17, 2010
-
-
Benjamin Kramer authored
Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream. The next step is to print the name directly into the stream, avoiding a temporary std::string copy. llvm-svn: 101632
-
- Jan 26, 2010
-
-
Ted Kremenek authored
llvm-svn: 94609
-
- Jan 25, 2010
-
-
Ted Kremenek authored
llvm-svn: 94428
-
Ted Kremenek authored
(1) libAnalysis is a generic analysis library that can be used by Sema. It defines the CFG, basic dataflow analysis primitives, and inexpensive flow-sensitive analyses (e.g. LiveVariables). (2) libChecker contains the guts of the static analyzer, incuding the path-sensitive analysis engine and domain-specific checks. Now any clients that want to use the frontend to build their own tools don't need to link in the entire static analyzer. This change exposes various obvious cleanups that can be made to the layout of files and headers in libChecker. More changes pending. :) This change also exposed a layering violation between AnalysisContext and MemRegion. BlockInvocationContext shouldn't explicitly know about BlockDataRegions. For now I've removed the BlockDataRegion* from BlockInvocationContext (removing context-sensitivity; although this wasn't used yet). We need to have a better way to extend BlockInvocationContext (and any LocationContext) to add context-sensitivty. llvm-svn: 94406
-
- Nov 29, 2009
-
-
Benjamin Kramer authored
llvm-svn: 90086
-
- Sep 25, 2009
-
-
Douglas Gregor authored
value-dependent. Audit (and fixed) all calls to Expr::isNullPointerConstant() to provide the correct behavior with value-dependent expressions. Fixes PR5041 and a crash in libstdc++ <locale>. In the same vein, properly compute value- and type-dependence for ChooseExpr. Fixes PR4996. llvm-svn: 82748
-
- Sep 09, 2009
-
-
Mike Stump authored
llvm-svn: 81346
-
- Aug 22, 2009
-
-
Ted Kremenek authored
AnalysisContext should never change. Along the way, propagate some constness around. llvm-svn: 79701
-
- Jul 16, 2009
-
-
Steve Naroff authored
Convert all clients to use the new predicate on Type. llvm-svn: 76076
-
- Jun 30, 2009
-
-
Argyrios Kyrtzidis authored
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
-
Argyrios Kyrtzidis authored
Timings showed no significant difference before and after the commit. llvm-svn: 74504
-
Argyrios Kyrtzidis authored
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
-
- Jun 18, 2009
-
-
- Apr 23, 2009
-
-
Douglas Gregor authored
methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). llvm-svn: 69849
-
- Apr 18, 2009
-
-
Douglas Gregor authored
lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. llvm-svn: 69406
-
- Feb 11, 2009
-
-
Ted Kremenek authored
llvm-svn: 64292
-
- Dec 08, 2008
-
-
Ted Kremenek authored
'self.myIvar = nil' (properties) only releases myIvar when the property has kind 'assign'. This fixes <rdar://problem/6380411>. llvm-svn: 60717
-
- Nov 24, 2008
-
-
Chris Lattner authored
uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. llvm-svn: 59947
-
- Nov 22, 2008
-
-
Fariborz Jahanian authored
Issuing diagnostics when assigning to read-only properties. This is work in progress. llvm-svn: 59874
-
- Nov 04, 2008
-
-
Douglas Gregor authored
Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr llvm-svn: 58698
-
- Oct 30, 2008
-
-
Ted Kremenek authored
Distinguish between self.X = ... where self.X is a property reference and self.X is an implicit call to setX. llvm-svn: 58462
-
Ted Kremenek authored
Fix PR 2978 false positive for missing release in -dealloc of an ivar retained via a property and then released by assigning nil to that property: http://llvm.org/bugs/show_bug.cgi?id=2978 llvm-svn: 58431
-
- Oct 29, 2008
-
-
Ted Kremenek authored
The attached patch adds additional checks to -warn-objc-missing-dealloc. It checks that all ivars which are used in implementation of synthesized properties are either a) released in dealloc if the property has retain" or "copy" attribute OR b) not released in dealloc if the property has "assign" attribute llvm-svn: 58363
-
- Aug 10, 2008
-
-
Chris Lattner authored
llvm-svn: 54605
-
- Jul 25, 2008
-
-
Ted Kremenek authored
Remove call to isSEL and isSEL itself since the call is dead (isObjCObjectPointerType() will never return true for selectors). llvm-svn: 54034
-
Ted Kremenek authored
Only warn about missing/incomplete -dealloc implementations when a class contains a non-SEL, non-IBOutlet ivar that references an ObjC object. llvm-svn: 54024
-
Ted Kremenek authored
Use ASTContext::isObjCObjectPointerType() to check if an ivar is a reference to an Objective-C object. llvm-svn: 53999
-
- Jul 24, 2008
-
-
Ted Kremenek authored
This fixes PR 2592: http://llvm.org/bugs/show_bug.cgi?id=2592 llvm-svn: 53987
-
- Jul 16, 2008
-
-
Ted Kremenek authored
llvm-svn: 53647
-
- Jul 14, 2008
-
-
Ted Kremenek authored
Refactored error reporting in CheckObjCDealloc and CheckObjCInstMethSignature to use this new bug reporting interface (major code simplification). llvm-svn: 53560
-
- Jul 11, 2008
-
-
Ted Kremenek authored
llvm-svn: 53473
-
- Jul 07, 2008
-
-
Ted Kremenek authored
This patch aims to address some of the concerns of PR 2517: http://llvm.org/bugs/show_bug.cgi?id=2517 llvm-svn: 53168
-
- Jul 03, 2008
-
-
Ted Kremenek authored
llvm-svn: 53100
-
Ted Kremenek authored
For the -dealloc checker, check the LangOptions to determine whether or not the code is compiled with GC. llvm-svn: 53098
-