Ted Kremenek
ade45d9703
Recycle memory for GRStates that are never referenced
...
by ExplodedNodes. This leads to about a 4-8%
reduction in memory footprint when analyzing
functions in sqlite3.
llvm-svn: 124214
2011-01-25 19:13:54 +00:00
Argyrios Kyrtzidis
ffb08c46fa
[analyzer] Handle the dot syntax for properties in the ExprEngine.
...
We translate property accesses to obj-c messages by simulating "loads" or "stores" to properties
using a pseudo-location SVal kind (ObjCPropRef).
Checkers can now reason about obj-c messages for both explicit message expressions and implicit
messages due to property accesses.
llvm-svn: 124161
2011-01-25 00:04:03 +00:00
Argyrios Kyrtzidis
fdbcd54658
[analyzer] Introduce ExprEngine::VisitObjCMessage for handling general ObjCMessages (both message expressions and property access)
...
and use it in ExprEngine::VisitObjCMessageExpr.
llvm-svn: 124160
2011-01-25 00:03:57 +00:00
Argyrios Kyrtzidis
37ab726d63
[analyzer] Introduce ObjCMessage which represents both explicit ObjC message expressions and implicit
...
messages that are sent for handling properties in dot syntax.
Replace all direct uses of ObjCMessageExpr in the checkers and checker interface with ObjCMessage.
llvm-svn: 124159
2011-01-25 00:03:53 +00:00
Jeffrey Yasskin
8dfa5f1776
Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and
...
-Wint-to-pointer-cast.
llvm-svn: 123719
2011-01-18 02:00:16 +00:00
Douglas Gregor
cdbc539aee
Introduce a new expression kind, SubstNonTypeTemplateParmPackExpr,
...
that captures the substitution of a non-type template argument pack
for a non-type template parameter pack within a pack expansion that
cannot be fully expanded. This follows the approach taken by
SubstTemplateTypeParmPackType.
llvm-svn: 123506
2011-01-15 01:15:58 +00:00
Ted Kremenek
44e2c5cdd9
Rename 'RemoveDeadBindings()' to 'removeDeadBindings()'
...
llvm-svn: 123460
2011-01-14 20:34:15 +00:00
Ted Kremenek
7c211625e0
Rename 'EnterStackFrame()' to 'enterStackFrame()'.
...
llvm-svn: 123459
2011-01-14 20:34:10 +00:00
Zhongxing Xu
0d87e0c65b
Support inlining base initializers. We still haven't got it completely right,
...
since the bindings are purged after they are set up. Need to investigate
RemoveDeadBindings algorithm.
llvm-svn: 123374
2011-01-13 12:30:12 +00:00
Ted Kremenek
f41bdd7c24
Rename 'HasGeneratedNode' to 'hasGeneratedNode'
...
and 'getBasePredecessor()' to 'getPredecessor()'.
Also remove a unneeded save-and-restore of
node builder's tag field.
llvm-svn: 123363
2011-01-13 04:36:46 +00:00
Argyrios Kyrtzidis
4b7433fab2
[analyzer] Introduce ObjCSelfInitChecker, which checks initialization methods to verify that they assign 'self' to the
...
result of an initialization call (e.g. [super init], or [self initWith..]) before using any instance variable or
returning 'self'.
llvm-svn: 123264
2011-01-11 19:45:25 +00:00
Argyrios Kyrtzidis
9c23e6c689
[analyzer] Support post-visiting ObjCIvarRefExprs for checkers.
...
llvm-svn: 123263
2011-01-11 19:45:20 +00:00
Ted Kremenek
841df11dab
Remove ProgramPoint parameter from GenericNodeBuilder::generateNode().
...
llvm-svn: 123240
2011-01-11 16:53:44 +00:00
Ted Kremenek
a00bccc0c5
Rework ExprEngine::processCFGBlockEntrance()
...
to use a node builder. This paves the way
for Checkers to interpose (via a "visit" method)
at the entrance to blocks.
llvm-svn: 123217
2011-01-11 06:37:47 +00:00
Ted Kremenek
926c96211e
Rename misc. methods in GRSubEngine to start
...
with a lower-case letter. No functionality change.
llvm-svn: 123211
2011-01-11 02:34:45 +00:00
Zhongxing Xu
40c9d8a4c5
Revert r123160. There are linking dependency problems.
...
llvm-svn: 123166
2011-01-10 09:23:01 +00:00
Zhongxing Xu
7d4ab7d915
ExprEngine.cpp and AnalysisConsumer.cpp should not be in the Checkers directory.
...
llvm-svn: 123160
2011-01-10 05:52:42 +00:00
Zhongxing Xu
5609e21337
In C++, assignment and compound assignment operators return an lvalue.
...
llvm-svn: 123158
2011-01-10 03:54:19 +00:00
Zhongxing Xu
0710f5c5e1
The isPrefix() checking is redundant. Lvalue incremental/decremental expressions
...
are all prefixes.
llvm-svn: 123156
2011-01-10 03:22:57 +00:00
Alexis Hunt
1d7926502f
Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,
...
more accurate, and makes it make sense for it to hold a delegating constructor
call.
llvm-svn: 123084
2011-01-08 20:30:50 +00:00
Douglas Gregor
35c7e84eb7
There is nothing interesting to analyze with a sizeof...(pack) expression
...
llvm-svn: 122818
2011-01-04 18:46:34 +00:00
Douglas Gregor
e8e9dd624c
Implement support for pack expansions whose pattern is a non-type
...
template argument (described by an expression, of course). For
example:
template<int...> struct int_tuple { };
template<int ...Values>
struct square {
typedef int_tuple<(Values*Values)...> type;
};
It also lays the foundation for pack expansions in an initializer-list.
llvm-svn: 122751
2011-01-03 17:17:50 +00:00
Ted Kremenek
5614c46fcf
Add basic support for pointer arithmetic in
...
SimpleSValBuilder. This clears up some
false positives emitted by ArrayBoundCheckerV2
due to the lack of support for pointer arithmetic.
llvm-svn: 122546
2010-12-24 08:39:33 +00:00
Ted Kremenek
d99bd55a5e
Chris Lattner has strong opinions about directory
...
layout. :)
Rename the 'EntoSA' directories to 'StaticAnalyzer'.
Internally we will still use the 'ento' namespace
for the analyzer engine (unless there are further
sabre rattlings...).
llvm-svn: 122514
2010-12-23 19:38:26 +00:00