- Dec 16, 2009
-
-
Ted Kremenek authored
Teach RetainSummaryManager::getSummary(FunctionDecl* FD) that 'FD->getIdentifier()' will not always return a non-null IdentifierInfo*. llvm-svn: 91512
-
Ted Kremenek authored
llvm-svn: 91511
-
Ted Kremenek authored
Teach NoReturnFunctionChecker that FunctionDecl::getIdentifier() is not guaranteed to return a non-null IdentifierInfo*. llvm-svn: 91510
-
Ted Kremenek authored
This change was a lot bigger than I originally anticipated; among other things it requires us storing more information in the CFG to record what block-level expressions need to be evaluated as lvalues. The big change is that CFGBlocks no longer contain Stmt*'s by CFGElements. Currently CFGElements just wrap Stmt*, but they also store a bit indicating whether the block-level expression should be evalauted as an lvalue. DeclStmts involving the initialization of a reference require us treating the initialization expression as an lvalue, even though that information isn't recorded in the AST. Conceptually this change isn't that complicated, but it required bubbling up the data through the CFGBuilder, to GRCoreEngine, and eventually to GRExprEngine. The addition of CFGElement is also useful for when we want to handle more control-flow constructs or other data we want to keep in the CFG that isn't represented well with just a block of statements. In GRExprEngine, this patch introduces logic for evaluating the lvalues of references, which currently retrieves the internal "pointer value" that the reference represents. EvalLoad does a two stage load to catch null dereferences involving an invalid reference (although this could possibly be caught earlier during the initialization of a reference). Symbols are currently symbolicated using the reference type, instead of a pointer type, and special handling is required creating ElementRegions that layer on SymbolicRegions (see the changes to RegionStoreManager). Along the way, the DeadStoresChecker also silences warnings involving dead stores to references. This was the original change I introduced (which I wrote test cases for) that I realized caused GRExprEngine to crash. llvm-svn: 91501
-
Ted Kremenek authored
Remove ValueManager::getRegionValueSymbolValOrUnknown(). It was just extra veneer on top of getRegionValueSymbolVal(). llvm-svn: 91471
-
- Dec 15, 2009
-
-
Chris Lattner authored
Remove isPod() from DenseMapInfo, splitting it out to its own isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. llvm-svn: 91422
-
Ted Kremenek authored
Until we can make the dead stores checker smarter, dont' emit dead store warnings for C++ objects (whose constructors/destructors have possible side-effects). llvm-svn: 91412
-
Ted Kremenek authored
now, don't construct CFGs that contain C++ try/catch statements, and have GRExprEngine abort a path if it encounters a C++ construct it doesn't understand (which is mostly everything at this point). llvm-svn: 91389
-
- Dec 14, 2009
-
-
rdar://problem/7468209Ted Kremenek authored
Fix: <rdar://problem/7468209> SymbolManager::isLive() should not crash on captured block variables that are passed by reference llvm-svn: 91348
-
Zhongxing Xu authored
llvm-svn: 91258
-
- Dec 12, 2009
-
-
Zhongxing Xu authored
llvm-svn: 91216
-
Jeffrey Yasskin authored
no extra safety anyway. llvm-svn: 91207
-
- Dec 11, 2009
-
-
Benjamin Kramer authored
llvm-svn: 91155
-
Ted Kremenek authored
Enhance understanding of VarRegions referenced by a block whose declarations are outside the current stack frame. Fixes <rdar://problem/7462324>. llvm-svn: 91107
-
Zhongxing Xu authored
llvm-svn: 91100
-
Zhongxing Xu authored
llvm-svn: 91085
-
- Dec 10, 2009
-
-
Ted Kremenek authored
Fix null dereference in OSAtomicChecker and special case SymbolicRegions. We still aren't handling them correctly; I've added to failing test cases to test/Analysis/NSString-failed-cases.m that should pass and then be merged in to test/Analysis/NSString.m. llvm-svn: 90993
-
- Dec 09, 2009
-
-
Zhongxing Xu authored
llvm-svn: 90968
-
Zhongxing Xu authored
Otherwise, even when real evaluation occurs, the previous fake auto transitions would still be in the destination set, causing fake state bifurcation. llvm-svn: 90967
-
Zhongxing Xu authored
instead of the ElementRegion obtained from casts. Test cast: the leak cannot occur bacause the true branch cannot be taken. llvm-svn: 90964
-
Zhongxing Xu authored
llvm-svn: 90953
-
Zhongxing Xu authored
repeatedly. llvm-svn: 90952
-
Ted Kremenek authored
by the test case in PR 5627. Essentially we shouldn't clear the ExplodedNodeSet where we deposit newly constructed nodes if that set is the 'Dst' set passed in. It is not okay to clear that set because it may already contain nodes. llvm-svn: 90931
-
- Dec 08, 2009
-
-
Zhongxing Xu authored
llvm-svn: 90847
-
- Dec 07, 2009
-
-
Ted Kremenek authored
- Refactor the MemRegion hierarchy to distinguish between different StackSpaceRegions for locals and parameters. - VarRegions for "captured" variables now have the BlockDataRegion as their super region (except those passed by reference) - Add transfer function support to GRExprEngine for BlockDeclRefExprs. This change also supports analyzing blocks as an analysis entry point (top-of-the-stack), which required pushing more context-sensitivity around in the MemRegion hierarchy via the use of LocationContext objects. Functionally almost everything is the same, except we track LocationContexts in a few more areas and StackSpaceRegions now refer to a StackFrameContext object. In the future we will need to modify MemRegionManager to allow multiple StackSpaceRegions in flight at once (for the analysis of multiple stack frames). llvm-svn: 90809
-
Zhongxing Xu authored
handler to this interface. GRExprEngine::CheckerEvalCall() will return true if one of the checkers has processed the node. In the future this might return void when we have some default checker. llvm-svn: 90755
-
- Dec 04, 2009
-
-
Ted Kremenek authored
llvm-svn: 90585
-
Ted Kremenek authored
llvm-svn: 90584
-
Ted Kremenek authored
llvm-svn: 90583
-
Ted Kremenek authored
llvm-svn: 90582
-
Ted Kremenek authored
Rename instance variable to avoid name conflict with parameters, and modify addTransition() to compare the correct state values. llvm-svn: 90552
-
Ted Kremenek authored
Allow BlockInvocationContext to wrap either a BlockDecl* or a BlockDataRegion*, giving us choice in our degree of context-sensitivity. llvm-svn: 90516
-
Ted Kremenek authored
llvm-svn: 90509
-
Ted Kremenek authored
Refactor FoldingSet profiling code for LocationContexts, and add a new BlockInvocationContext to represent the invocation of a block. llvm-svn: 90506
-
Ted Kremenek authored
llvm-svn: 90503
-
Ted Kremenek authored
llvm-svn: 90499
-
- Dec 03, 2009
-
-
Ted Kremenek authored
Tweak handling of BlockDataRegions in RegionStoreManager::RemoveDeadBindings(): only the VarRegions for variables marked with the '__block' annotation should have their lifetime extended by a BlockDataRegion. llvm-svn: 90462
-
Zhongxing Xu authored
Patch by Lei Zhang! llvm-svn: 90444
-
Daniel Dunbar authored
llvm-svn: 90443
-
Ted Kremenek authored
Add value invalidation logic for block-captured variables. Conceptually invoking a block (without specific reasoning of what the block does) can invalidate any value to it by reference when the block was created. llvm-svn: 90431
-