- 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 20, 2010
-
-
Ted Kremenek authored
llvm-svn: 122270
-
- Dec 02, 2010
-
-
Ted Kremenek authored
llvm-svn: 120696
-
- Dec 01, 2010
-
-
Ted Kremenek authored
to 'assumeXXX'. llvm-svn: 120614
-
Ted Kremenek authored
'evalXXX'. llvm-svn: 120609
-
Ted Kremenek authored
reflects what the class actually does. llvm-svn: 120605
-
- Oct 22, 2010
-
-
Benjamin Kramer authored
llvm-svn: 117104
-
- Oct 21, 2010
-
-
Ted Kremenek authored
llvm-svn: 116971
-
- Aug 15, 2010
-
-
Argyrios Kyrtzidis authored
llvm-svn: 111091
-
- Aug 11, 2010
-
-
Zhongxing Xu authored
llvm-svn: 110784
-
- Jul 06, 2010
-
-
Jordy Rose authored
Improve NULL-checking for CFRetain/CFRelease. We now remember that the argument was non-NULL, and we report where the null assumption came from (like AttrNonNullChecker already did). llvm-svn: 107633
-
- May 17, 2010
-
-
John McCall authored
out. The remaining ones are okay. llvm-svn: 103973
-
- 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
-
- Mar 27, 2010
-
-
Benjamin Kramer authored
llvm-svn: 99731
-
- Feb 08, 2010
-
-
Benjamin Kramer authored
llvm-svn: 95561
-
Ted Kremenek authored
llvm-svn: 95545
-
Zhongxing Xu authored
GRState::getSVal(MemRegion*) => Load(). llvm-svn: 95541
-
- 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
-
- Dec 23, 2009
-
-
Nuno Lopes authored
llvm-svn: 92012
-
- Nov 29, 2009
-
-
Benjamin Kramer authored
llvm-svn: 90084
-
- Nov 28, 2009
-
-
Kovarththanan Rajaratnam authored
llvm-svn: 90028
-
- Nov 23, 2009
-
-
Ted Kremenek authored
along the way. Important changes: 1) To generate a sink node, use GenerateSink(); GenerateNode() is for generating regular transitions. This makes the API clearer and also allows us to use the 'bool' option to GenerateNode() for a different purpose. 2) GenerateNode() now automatically adds the generated node to the destination ExplodedNodeSet (autotransition) unless the client specifies otherwise with a bool flag. Several checkers did not call 'addTransition()' after calling 'GenerateNode()', causing the simulation path to be prematurely culled when a non-fail stop bug was encountered. 3) Add variants of GenerateNode()/GenerateSink() that take neither a Stmt* or a GRState*; most callers of GenerateNode() just pass in the same Stmt* as provided when the CheckerContext object is created; we can just use that the majority of the time. This cleanup also allows us to potentially coelesce the APIs for evaluating branches and end-of-paths (which currently directly use builders). 4) addTransition() no longer needs to be called except for a few cases. We now have a variant of addTransition() that takes a GRState*; this allows one to propagate the updated state without caring about generating a new node explicitly. This nicely cleaned up a bunch of cases that called autoTransition() with a bunch of conditional logic surround the call (that common logic has now been swallowed up by addTransition() itself). llvm-svn: 89707
-
- Nov 20, 2009
-
-
Benjamin Kramer authored
llvm-svn: 89453
-
Ted Kremenek authored
Add simple static analyzer checker to check for sending 'release', 'retain', etc. directly to a class. Fixes <rdar://problem/7252064>. llvm-svn: 89449
-
- Nov 10, 2009
-
-
Zhongxing Xu authored
getBaseRegion will be used in another method. llvm-svn: 86649
-
- Nov 03, 2009
-
-
- Oct 18, 2009
-
-
Daniel Dunbar authored
are updated. llvm-svn: 84447
-
Daniel Dunbar authored
llvm-svn: 84436
-
- Oct 17, 2009
-
-
Daniel Dunbar authored
llvm-svn: 84338
-
- Sep 22, 2009
-
-
John McCall authored
Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. llvm-svn: 82501
-
- Sep 09, 2009
-
-
Mike Stump authored
llvm-svn: 81346
-
- Aug 21, 2009
-
-
Zhongxing Xu authored
to untie the ExplodedGraph from a specific Decl. llvm-svn: 79588
-
- Aug 06, 2009
-
-
Zhongxing Xu authored
Some Builders need further cleanup. llvm-svn: 78301
-
Zhongxing Xu authored
and their impl base classes. This can greatly simply some code of the core analysis engine. This patch merges ExplodedNodeImpl into ExplodedNode. llvm-svn: 78270
-
- Jul 29, 2009
-
-
Ted Kremenek authored
we don't care about ElementRegions layered on top of a base region. llvm-svn: 77484
-
- Jul 23, 2009
-
-
Ted Kremenek authored
Educate GRExprEngine::VisitGraph() about 'PreStmt'. Mark the constructor of 'PostStmt' to be explicit, preventing implicit conversions and the selection of the wrong 'generateNode' method in GRStmtNodeBuilder. Constify a bunch of arguments, which falls out of the changes to ProgramPoint. llvm-svn: 76809
-