Argyrios Kyrtzidis
d22d8ff343
Minor refactoring; have BugReport::getRanges return a pair of iterator, no functionality change.
...
llvm-svn: 120873
2010-12-04 01:12:15 +00:00
Ted Kremenek
48b430d789
Fix an insidious bug in BugReporter where
...
a node in the trimmed graph might not always
correctly map back to the original error node.
This could cause a crash in some cases when
flagging memory leaks.
llvm-svn: 120795
2010-12-03 06:52:30 +00:00
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
Argyrios Kyrtzidis
833be2ddd8
Also show notes about the taken path in TextPathDiagnostics.
...
llvm-svn: 120783
2010-12-03 02:03:26 +00:00
Argyrios Kyrtzidis
2fd03a60e4
Remove leftover code and use the text path diagnostic client even without a specified output file since
...
it just uses diagnostic notes.
llvm-svn: 120773
2010-12-03 01:17:19 +00:00
Argyrios Kyrtzidis
c95e596728
Introduce TextPathDiagnostics, a simple PathDiagnosticClient that outputs as diagnostic notes
...
the sequence of events; useful for testing.
llvm-svn: 120770
2010-12-03 00:58:14 +00:00
Argyrios Kyrtzidis
7c0570e40f
Handle any number of SourceRanges inside BugReporter::FlushReport.
...
llvm-svn: 120769
2010-12-03 00:58:10 +00:00
Argyrios Kyrtzidis
c23f0e0a03
Rename Create[*]DiagnosticClient -> create[*]DiagnosticClient.
...
llvm-svn: 120768
2010-12-03 00:58:08 +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
Michael J. Spencer
8aaf49959c
Merge System into Support.
...
llvm-svn: 120297
2010-11-29 18:12:39 +00:00
Zhongxing Xu
e1e8565cd9
Do not use StripCasts() in this context.
...
llvm-svn: 120178
2010-11-26 09:14:07 +00:00
Zhongxing Xu
5afc4d80c7
Should not use StripCasts() in this context.
...
llvm-svn: 120177
2010-11-26 09:07:38 +00:00
Zhongxing Xu
032071688b
Rename CXXObjectRegion to CXXTempObjectRegion.
...
llvm-svn: 120176
2010-11-26 08:52:48 +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
e23ab6fae2
Add a fixme.
...
llvm-svn: 120172
2010-11-26 07:15:40 +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
7514633c26
Improve comments.
...
llvm-svn: 120142
2010-11-25 02:52:17 +00:00
Zhongxing Xu
be83a3aeca
Add dump method.
...
llvm-svn: 120141
2010-11-25 02:07:24 +00:00
Zhongxing Xu
8be65a792f
When getting CXXThisRegion from CXXMethodDecl, use the qualifiers. This is
...
to be consistent with the type of 'this' expr in the method.
此行及以下内容将会被忽略--
M test/Analysis/method-call.cpp
M include/clang/Checker/PathSensitive/GRExprEngine.h
M lib/Checker/GRCXXExprEngine.cpp
llvm-svn: 120094
2010-11-24 13:48:50 +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
Ted Kremenek
b3b56c6bcd
Adjust method calls to reflect name changes in
...
ImmutableSet/ImmtuableMap/ImmutableList APIs.
Along the way, clean up some method names in
the static analyzer so that they are more
descriptive and/or start with lowercase letters.
llvm-svn: 120071
2010-11-24 00:54:37 +00:00
Zhongxing Xu
2cf9b135d4
Add comments.
...
llvm-svn: 119900
2010-11-20 08:17:16 +00:00
Zhanyong Wan
7426ea729c
Fix a typo in EnvironmentManager::bindExprAndLocation(). Reviewed by kremenek.
...
llvm-svn: 119899
2010-11-20 07:52:48 +00:00
Zhongxing Xu
2c966716ff
Handle CFGAutomaticObjDtor.
...
llvm-svn: 119897
2010-11-20 06:53:12 +00:00
Argyrios Kyrtzidis
c79346a57c
Since multiple diagnostics can share one diagnostic client, have the client keeping track
...
of the total number of warnings/errors reported.
llvm-svn: 119731
2010-11-18 20:06:46 +00:00
Argyrios Kyrtzidis
d004064864
Refactoring of Diagnostic class.
...
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.
llvm-svn: 119730
2010-11-18 20:06:41 +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
Marcin Swiderski
af56739355
In EvalArguments allow for evaluation of first argument always as a lvalue. Will be used for CXXOperatorCallExpr that represents method call.
...
llvm-svn: 119567
2010-11-17 21:27:36 +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
35d023164c
do not do post checks. Because at this point we just enter the call.
...
llvm-svn: 119480
2010-11-17 07:31:08 +00:00
Zhongxing Xu
366340298e
Remove comments. We are already doing actual method call by inlining it.
...
llvm-svn: 119477
2010-11-17 07:21:49 +00:00
Marcin Swiderski
2b2cd0e6b4
Added mapping from 'this' to it's SymbolicRegion in BasicStoreManager::getInitialStore.
...
llvm-svn: 119467
2010-11-17 06:22:54 +00:00
Ted Kremenek
32195d9a58
Add comments.
...
llvm-svn: 119436
2010-11-17 00:50:34 +00:00
Ted Kremenek
0c27bcfd05
Static analyzer: Catch calls to malloc() with
...
allocation sizes of 0 bytes.
Fixes PR 2899.
llvm-svn: 119364
2010-11-16 18:47:04 +00:00
John McCall
6dd263e31b
Reverting r119341: doesn't compile, no obvious fix.
...
llvm-svn: 119342
2010-11-16 09:18:38 +00:00
Marcin Swiderski
76e66c1d60
Refactored GRExprEngine::getCXXThisRegion to use CXXMethodDecl::getThisType instead of calculating it by hand.
...
llvm-svn: 119341
2010-11-16 08:50:38 +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
Marcin Swiderski
4098598ca8
Basic support for C++ in BasicStore:
...
- CXXThisRegion treated like VarRegion and ObjCIVarRegion in various places,
- Reference treated like pointer in BindDeclInternal.
llvm-svn: 119333
2010-11-16 07:15:33 +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