Ted Kremenek
57859c56c8
Also include the pointer address of the ExplodedNode
...
when generating DOT output for an ExplodedGraph.
llvm-svn: 120794
2010-12-03 06:52:26 +00:00
Ted Kremenek
90af90967a
Merge ValueManager into SValBuilder.
...
llvm-svn: 120696
2010-12-02 07:49:45 +00:00
John McCall
b7bd14fa08
Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
...
into the latter.
llvm-svn: 120643
2010-12-02 01:19:52 +00:00
Ted Kremenek
c5bea1e337
Rename all 'AssumeXXX' methods in libChecker
...
to 'assumeXXX'.
llvm-svn: 120614
2010-12-01 22:16:56 +00:00
Ted Kremenek
dc891429e4
Rename all 'EvalXXX' methods in libChecker to
...
'evalXXX'.
llvm-svn: 120609
2010-12-01 21:57:22 +00:00
Ted Kremenek
9d0bb1e366
Rename 'SValuator' to 'SValBuilder'. The new name
...
reflects what the class actually does.
llvm-svn: 120605
2010-12-01 21:28:31 +00:00
John McCall
f3735e01ce
Restore the lvalue-to-rvalue conversion patch with a minimal fix.
...
llvm-svn: 120555
2010-12-01 04:43:34 +00:00
John McCall
4f22c9de48
L-value to r-value conversion is not ready for prime-time.
...
llvm-svn: 120433
2010-11-30 17:58:55 +00:00
John McCall
824fd1dcff
Introduce an r-value to l-value cast kind. I'm not promising anything
...
about the reliability of this yet.
llvm-svn: 120422
2010-11-30 10:13:06 +00:00
Zhongxing Xu
ec0b8e32ee
Regionstore: support derived-to-base cast by creating a CXXBaseObjectRegion.
...
llvm-svn: 120173
2010-11-26 08:21:53 +00:00
Zhongxing Xu
16278859e8
For CFGAutomaticObjDtor, the type may be reference type, e.g., const A &c = A();
...
Also apply some new coding style.
llvm-svn: 120144
2010-11-25 06:35:14 +00:00
Zhongxing Xu
33f13595c9
handle CXXFunctionalCastExpr in visitLValue and Environment.
...
llvm-svn: 120143
2010-11-25 03:18:57 +00:00
Zhongxing Xu
a1a9ba11b7
Let StackFrameContext represent if the call expr is evaluated as lvalue.
...
This is required for supporting const reference to temporary objects.
llvm-svn: 120093
2010-11-24 13:08:51 +00:00
Zhongxing Xu
cb29802198
Use StackFrameContext directly in CallEnter program point. Then we don't need
...
to remake the stackframe everytime in GRExprEngine::ProcessCallEnter().
llvm-svn: 120087
2010-11-24 08:53:20 +00:00
Zhanyong Wan
8e82c6372a
Add an assert() to catch errors using EvalLoad(). Reviewed by kremenek.
...
llvm-svn: 120073
2010-11-24 01:47:11 +00:00
Zhongxing Xu
2c966716ff
Handle CFGAutomaticObjDtor.
...
llvm-svn: 119897
2010-11-20 06:53:12 +00:00
Marcin Swiderski
e5a1e8ae12
Added method for handling CXXOperatorCallExpr differently from CallExpr if CXXOperatorCallExpr represents method call.
...
Also fixed returning ExpolodedNodeSet from VisitCXXMethodCallExpr.
llvm-svn: 119684
2010-11-18 06:29:23 +00:00
Zhongxing Xu
33d7ea9355
Add skeleton for handling various cfg dtors.
...
llvm-svn: 119491
2010-11-17 09:16:19 +00:00
Zhongxing Xu
1ade3267d7
Handle member initializer in C++ ctor.
...
- Add a new Kind of ProgramPoint: PostInitializer.
- Still use GRStmtNodeBuilder. But special handling PostInitializer in
GRStmtNodeBuilder::GenerateAutoTransition().
- Someday we should clean up the interface of GRStmtNodeBuilder.
llvm-svn: 119335
2010-11-16 07:52:17 +00:00
John McCall
d50a27111c
Kill CK_Unknown and flesh out the documentation for the existing CastKinds.
...
llvm-svn: 119331
2010-11-16 05:46:29 +00:00
John McCall
8d69a2160e
Add a new expression kind, OpaqueValueExpr, which is useful for
...
certain internal type-checking procedures as well as for representing
certain implicitly-generated operations. Uses to follow.
llvm-svn: 119289
2010-11-15 23:31:06 +00:00
John McCall
8cb679e4e1
Assorted work leading towards the elimination of CK_Unknown.
...
llvm-svn: 119138
2010-11-15 09:13:47 +00:00
Zhongxing Xu
5d30c69813
Add skeleton for handling other kinds of CFGElements.
...
llvm-svn: 119135
2010-11-15 08:48:43 +00:00
John McCall
d764625448
Add a few more complex-related cast kinds that arise due to arbitrary
...
implicit conversions; the last batch was specific to promotions.
I think this is the full set we need. I do think dividing the cast
kinds into floating and integral is probably a good idea.
Annotate a *lot* more C casts with useful cast kinds.
llvm-svn: 119036
2010-11-14 08:17:51 +00:00
John McCall
c5e62b47af
Introduce five new cast kinds for various conversions into and
...
between complex types.
llvm-svn: 118994
2010-11-13 09:02:35 +00:00
John McCall
e84af4e486
Introduce a null-to-pointer implicit cast kind.
...
llvm-svn: 118966
2010-11-13 01:35:44 +00:00
Zhongxing Xu
627a1868d2
Now initializer of C++ record type is visited as block-level expr.
...
Let the destination of AggExprVisitor be an explicit MemRegion.
Reenable the test case.
llvm-svn: 117908
2010-11-01 09:09:44 +00:00
Ted Kremenek
982b32b1b6
Remove obsolete GRAuditor and GRSimpleAPICheck, which have been completely subsumed by the Checker interface.
...
llvm-svn: 116973
2010-10-20 23:48:34 +00:00
Fariborz Jahanian
681c0754d9
Eliminate usage of ObjCSuperExpr used for
...
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788
llvm-svn: 116483
2010-10-14 16:04:05 +00:00
Zhongxing Xu
23e082d32c
Call PreVisitDeclStmt for C++ aggregate initializers. Patch by Jim Goodnow II.
...
llvm-svn: 116473
2010-10-14 05:22:59 +00:00
Ted Kremenek
fd5856adcb
Refactor GRExprEngine::VisitCall() to use EvalArguments(), just like VisitCXXMemberCallExpr(). Ideally we should unify these code paths as much as possible, since they only differ by a few details.
...
llvm-svn: 114628
2010-09-23 05:14:51 +00:00
Tom Care
58191966bc
Refactored BugReporter to refer to EndNode as ErrorNode. We currently make the assumption that EndNode == ErrorNode, but upcoming changes will break this.
...
llvm-svn: 114065
2010-09-16 03:50:38 +00:00
Zhongxing Xu
2cd7a78c76
Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patch
...
and discussions with Ted and Jordy.
llvm-svn: 114056
2010-09-16 01:25:47 +00:00
Tom Care
c88ed9561e
Rename 'MaxLoop' to 'MaxVisit' in AnalysisManager to more correctly reflect that we aborted analysis may not necessarily be due to a loop.
...
llvm-svn: 113862
2010-09-14 21:35:27 +00:00
Sebastian Redl
9ac55dd8e4
Serialization support for CXXNoexceptExpr.
...
llvm-svn: 113627
2010-09-10 20:55:54 +00:00
Ted Kremenek
e495c99055
Implement: <rdar://problem/6351970> rule request: warn if @synchronized mutex can be nil
...
llvm-svn: 113573
2010-09-10 03:05:40 +00:00
Ted Kremenek
ed12f1b9f9
Add ObjCAtSynchronizedStmt to the CFG and add GRExprEngine support (PreVisit for checkers).
...
llvm-svn: 113572
2010-09-10 03:05:33 +00:00
Benjamin Kramer
d4b4b7e8a1
Remove unused variable.
...
llvm-svn: 113482
2010-09-09 12:27:34 +00:00
Ted Kremenek
5f256da834
Rename GRState::getSVal() -> getRawSVal() and getSimplifiedSVal() -> getSVal().
...
The end result is now we eagarly constant-fold symbols in the analyzer that are perfectly constrained
to be a constant value. This allows us to recover some path-sensitivity in some cases by lowering
the required level of reasoning power needed to evaluate some expressions.
The net win from this change is that the false positive in PR 8015 is fixed, and we also
find more idempotent operations bugs.
We do, however, regress with the BugReporterVisitors, which need to be modified to understand
this constant folding (and look past it). This causes some diagnostic regressions in plist-output.m
which will get addressed in a future patch. plist-output.m is now marked XFAIL, while
plist-output-alternate.m now tests that the plist output is working, but with the suboptimal
diagnostics. This second test file will eventually be removed.
llvm-svn: 113477
2010-09-09 07:13:00 +00:00
Ted Kremenek
8f0e834c4c
Static analyzer fix: <rdar://problem/5880430> Switch on enum should not consider default case live if all enum values are covered
...
llvm-svn: 113457
2010-09-09 00:40:40 +00:00
Francois Pichet
5cc0a67f08
Fix warnings caused by new CXXUuidofExprClass enumerator.
...
llvm-svn: 113444
2010-09-08 23:47:05 +00:00
Douglas Gregor
6429f5cf29
Eliminate CXXBindReferenceExpr, which was used in a ton of
...
well-intentioned but completely unused code.
llvm-svn: 112868
2010-09-02 21:50:02 +00:00
Zhongxing Xu
dcf7b3501d
update comments.
...
llvm-svn: 112796
2010-09-02 01:56:39 +00:00
Ted Kremenek
07343c02be
For GRExprEngine::EvalBind() (and called visitors), unifiy StoreE and AssignE. Now StoreE (const Stmt*) represents the expression where the store took place, which is the assignment expression if it takes place in an assignment. This removes some conceptual dissidence as well as removes an extra parameter from the Checker::PreVisitBind() visitor. It also improves ranges and source location information in analyzer diagnostics.
...
llvm-svn: 112789
2010-09-02 00:56:20 +00:00
Alexis Hunt
3b7918625c
Revert my user-defined literal commits - r1124{58,60,67} pending
...
some issues being sorted out.
llvm-svn: 112493
2010-08-30 17:47:05 +00:00
Alexis Hunt
79eb5469e0
Implement C++0x user-defined string literals.
...
The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.
llvm-svn: 112458
2010-08-29 21:26:48 +00:00
Ted Kremenek
036223bdcf
Fix horrible GRExprEngine bug where switch statements with no 'case:' statements would cause the path to get prematurely aborted. Fixes <rdar://problem/8360854>.
...
llvm-svn: 112233
2010-08-26 22:19:33 +00:00
Ted Kremenek
c8bd967430
Remove redundant cast<...>.
...
llvm-svn: 112229
2010-08-26 22:04:01 +00:00
John McCall
e302792b61
GCC didn't care for my attempt at API compatibility, so brute-force everything
...
to the new constants.
llvm-svn: 112047
2010-08-25 11:45:40 +00:00
Eli Friedman
04831926ec
Detabify.
...
llvm-svn: 111768
2010-08-22 01:00:03 +00:00