Ted Kremenek
7d5389e4b3
- Revert r59229 and r59232: AllocRegion should be immutable.
...
- Temporarily disabled test Analysis/array-struct.c for region store.
llvm-svn: 59245
2008-11-13 15:42:31 +00:00
Zhongxing Xu
e9857ddcc0
Add test for unsigned array index.
...
llvm-svn: 59239
2008-11-13 09:20:05 +00:00
Zhongxing Xu
b9ec8f555f
Add test for incomplete struct pointer.
...
llvm-svn: 59236
2008-11-13 08:44:52 +00:00
Zhongxing Xu
06a04bd1ae
Add a test case for alloca().
...
llvm-svn: 59233
2008-11-13 07:59:15 +00:00
Ted Kremenek
16866d6fd8
GRExprEngine/CFRefCount/GRSimpleVals: We don't do any special handling (yet) of vector types. Add explicit checks that when we process integers that they really are scalars.
...
llvm-svn: 59225
2008-11-13 06:10:40 +00:00
Ted Kremenek
45698bf05f
GRExprEngine::VisitInitListExpr:
...
- Don't crash on vector types.
- Handle typedefs.
llvm-svn: 59220
2008-11-13 05:05:34 +00:00
Zhongxing Xu
f8b84b0def
Add && to test command.
...
llvm-svn: 59014
2008-11-11 01:25:18 +00:00
Zhongxing Xu
7be05ed6b8
Add region store model to path-sensitive testing.
...
llvm-svn: 58983
2008-11-10 09:43:12 +00:00
Anders Carlsson
aaa183e944
include alloca.h instead of malloc.h. If this doesn't work for everyone we can just declare alloca directly in the file.
...
llvm-svn: 58853
2008-11-07 15:41:33 +00:00
Argyrios Kyrtzidis
a848ced426
Append the test runs with '&&'.
...
llvm-svn: 58851
2008-11-07 14:28:18 +00:00
Argyrios Kyrtzidis
c118934d12
Bring in 'alloca' for the Analysis/stack-addr-ps.c test case.
...
llvm-svn: 58849
2008-11-07 14:00:25 +00:00
Ted Kremenek
eb39732d53
Add a test case for CFMakeCollectable.
...
llvm-svn: 58772
2008-11-05 22:17:39 +00:00
Zhongxing Xu
de297f8198
Add function side-effect test cast.
...
llvm-svn: 58565
2008-11-02 13:17:44 +00:00
Ted Kremenek
f3d9f805c7
Add 'alloca' test case for return-of-stack-address checker.
...
llvm-svn: 58554
2008-11-02 00:37:31 +00:00
Zhongxing Xu
87bfa4340c
Add test code for array initialization.
...
llvm-svn: 58502
2008-10-31 10:23:14 +00:00
Ted Kremenek
d119c0bd24
Added missing 'expected-warning'
...
llvm-svn: 58481
2008-10-31 00:20:13 +00:00
Ted Kremenek
20cf431bce
Enhance compound literal test case.
...
llvm-svn: 58480
2008-10-31 00:19:42 +00:00
Ted Kremenek
3d71fe1503
Add missing "expected warning".
...
Add compound literal with empty initializer (just to test the analyzer handles it).
llvm-svn: 58470
2008-10-30 23:17:05 +00:00
Ted Kremenek
ae4d61efb2
Add method that will be invoked using the dot-syntax just to test that the missing -dealloc checker handles it.
...
llvm-svn: 58467
2008-10-30 23:00:13 +00:00
Ted Kremenek
b7d13803ce
Improve compound literal test case.
...
llvm-svn: 58447
2008-10-30 18:46:50 +00:00
Ted Kremenek
d26da8cf82
Patch by Nikita Zhuk: test case for fix for false positive reported in PR2978.
...
llvm-svn: 58432
2008-10-30 15:19:43 +00:00
Ted Kremenek
03ce9eeee2
Add 'expected-warning' for braces around scalar initializer
...
llvm-svn: 58280
2008-10-27 22:00:16 +00:00
Ted Kremenek
c1739912c8
Added compound literal test case.
...
llvm-svn: 58279
2008-10-27 21:57:17 +00:00
Zhongxing Xu
b32af436df
Add test for SCA region store.
...
llvm-svn: 58235
2008-10-27 09:21:27 +00:00
Zhongxing Xu
7a2ce566bc
Add test for SCA region store.
...
llvm-svn: 58234
2008-10-27 09:19:25 +00:00
Ted Kremenek
e69a1fa342
Do not crash when performing VisitLValue on union types.
...
This fixes PR 2948.
llvm-svn: 58148
2008-10-25 20:09:21 +00:00
Zhongxing Xu
80422b07c5
Add StringLiteral test code.
...
llvm-svn: 58136
2008-10-25 14:11:23 +00:00
Ted Kremenek
14e6350dcc
This test no longer is marked XFAIL.
...
Enhance test to include a case where a tracked object escapes because it is stored to a local ivar through a method dispatch to 'self.'
llvm-svn: 58109
2008-10-24 20:33:56 +00:00
Zhongxing Xu
d2f0c7b37b
Add random array and struct test code for SCA.
...
llvm-svn: 58085
2008-10-24 08:51:58 +00:00
Ted Kremenek
c5092cc061
Temporarily mark this test XFAIL.
...
llvm-svn: 58024
2008-10-23 01:57:31 +00:00
Ted Kremenek
631ff239fc
Warn about potentially leaked objects that are returned from methods whose names do not follow the Cocoa Memory Management guidelines.
...
llvm-svn: 58012
2008-10-22 23:56:21 +00:00
Ted Kremenek
9a96bf22ec
Enhance reference-count checker to correctly identify CG "release" functions. This fixes <rdar://problem/6303488>.
...
llvm-svn: 57997
2008-10-22 20:54:52 +00:00
Zhongxing Xu
da84f683c8
Add test case for FuncDecl and function pointer variable.
...
llvm-svn: 57979
2008-10-22 14:39:20 +00:00
Ted Kremenek
c32ec3a0c4
Further improve path-sensitivity with divide-by-zero checking by assuming that a denominator cannot be zero even when the result of an '/' or '%' expression is unknown.
...
llvm-svn: 57855
2008-10-20 23:40:25 +00:00
Ted Kremenek
e67437f3a9
Added test case inspired by <rdar://6268365>: recover path-sensitivity after compound assignment when the result of the assignment is not known.
...
llvm-svn: 57852
2008-10-20 23:14:31 +00:00
Ted Kremenek
f8d65a30d6
Add support in GRExprEngine for UnaryOperator::AlignOf. This fixes one crash report in PR 2796.
...
llvm-svn: 57777
2008-10-18 22:20:20 +00:00
Ted Kremenek
fef1f30ea2
Use "VisitLValue" when processing the base for "x.f" field accesses, and "Visit" when processing the base for "x->f" field accesses.
...
llvm-svn: 57754
2008-10-18 03:28:48 +00:00
Ted Kremenek
0b09ea54ba
This test now passes again.
...
llvm-svn: 57742
2008-10-17 22:53:09 +00:00
Ted Kremenek
055891cbf3
Test now passes.
...
llvm-svn: 57718
2008-10-17 20:29:05 +00:00
Ted Kremenek
5870046c43
"Implement" GRExprEngine::VisitLValue for ObjCPropertyRefExpr. This is only a bandid; we need to properly handle properties by using locv/nonloc objects and specially handling property assignments in the transfer function for BinaryOperator.
...
llvm-svn: 57693
2008-10-17 17:24:14 +00:00
Zhongxing Xu
0dd213f8f5
Add test case for array and struct variable lvalue evaluation.
...
llvm-svn: 57670
2008-10-17 05:19:52 +00:00
Ted Kremenek
7ff153c9cb
Mark these tests XFAIL. We need to add back assumption logic when doing array and field accesses.
...
llvm-svn: 57658
2008-10-17 00:51:39 +00:00
Ted Kremenek
bb7818b666
Enhance dead store checker to not flag preincrements to dead variables where the preincrement is a subexpression, e.g. foo(++x); This can cause false negatives, but will remove a whole class of false positives.
...
llvm-svn: 57554
2008-10-15 05:23:41 +00:00
Ted Kremenek
3aa89a971d
Enhance NSError** checking with analogous checking for CFErrorRef*.
...
Expand checking to include functions, not just methods.
llvm-svn: 56938
2008-10-01 23:24:09 +00:00
Ted Kremenek
63249b6e57
Added test case.
...
llvm-svn: 56915
2008-10-01 05:05:46 +00:00
Ted Kremenek
f5e7e3ae26
Add more control-flow to test case.
...
llvm-svn: 56707
2008-09-26 23:05:47 +00:00
Ted Kremenek
d86d39cc9e
Add CFG support for implicit-control flow for VLA size expressions within an SizeOfAlignOfTypeExpr.
...
llvm-svn: 56706
2008-09-26 22:58:57 +00:00
Ted Kremenek
2ece64bbc4
Examine VLA size expressions when computing liveness information.
...
Fixes <rdar://problem/6248086>
llvm-svn: 56645
2008-09-26 05:52:45 +00:00
Ted Kremenek
1f58ec6475
Updated test case.
...
llvm-svn: 56548
2008-09-24 06:40:03 +00:00
Ted Kremenek
81ec48a1d5
Added test case.
...
llvm-svn: 56493
2008-09-23 18:05:01 +00:00