Commit Graph

29 Commits

Author SHA1 Message Date
Ted Kremenek 3f955e6d89 [analyzer] rename all experimental checker packages to have 'experimental' be the common root package.
llvm-svn: 136835
2011-08-03 23:14:55 +00:00
Argyrios Kyrtzidis 9eb02dfa89 [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award.
llvm-svn: 126676
2011-02-28 19:49:42 +00:00
Argyrios Kyrtzidis b388f77ad9 [analyzer] Remove '-analyzer-experimental-internal-checks' flag, it doesn't have any checkers associated with it anymore.
llvm-svn: 126440
2011-02-24 21:43:08 +00:00
Ted Kremenek 2f2692f8ca Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.
llvm-svn: 95348
2010-02-05 02:06:54 +00:00
Ted Kremenek 91df0ec92c Simplify test case. This test case also applies to PR 6013.
llvm-svn: 93444
2010-01-14 19:47:50 +00:00
Ted Kremenek b9ad45ab60 Associate test case with Bugzilla PR.
llvm-svn: 93440
2010-01-14 19:38:41 +00:00
Zhongxing Xu 803ade2532 Fix pr6035.
llvm-svn: 93422
2010-01-14 03:45:06 +00:00
Chris Lattner f9895c48fd add a bunch of missing prototypes to tests
llvm-svn: 93072
2010-01-09 20:43:19 +00:00
Zhongxing Xu f22afe32f9 Move test case to a more appropriate file.
llvm-svn: 92725
2010-01-05 11:49:21 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Zhongxing Xu 27f686f8ec Replace clang-cc with clang -cc1.
llvm-svn: 91272
2009-12-14 06:34:20 +00:00
Daniel Dunbar 4e7596cc3a Normalize options to use '-FOO' instead of '--FOO'.
llvm-svn: 90071
2009-11-29 09:33:10 +00:00
Ted Kremenek 4ef13f8ac9 Add clang-cc option "--analyzer-experimental-internal-checks". This
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.

llvm-svn: 88671
2009-11-13 18:46:29 +00:00
Zhongxing Xu 969242948f Add comments to test.
llvm-svn: 84078
2009-10-14 06:05:09 +00:00
Ted Kremenek e95b439cc3 Make this test case more portable by removing its dependency on system header files.
llvm-svn: 79511
2009-08-20 04:48:23 +00:00
Anders Carlsson 499de4252d Add casts to avoid a bunch of unused expr warnings. (They aren't reported right now due to a bug that I intend to fix). Ted, please review.
llvm-svn: 77630
2009-07-30 22:37:41 +00:00
Mike Stump 41ecf6cc3d Prep for new warning.
llvm-svn: 76607
2009-07-21 18:45:53 +00:00
Eli Friedman fd9b1094b8 Fix silly mistake I made applying patch to fix test.
llvm-svn: 75303
2009-07-10 22:27:56 +00:00
Eli Friedman 7d369cd2a6 Misc fixes to fix tests on OpenBSD, per email to cfe-commits. Patches
by Jonathan Gray and Krister Walfridsson.

llvm-svn: 75268
2009-07-10 20:10:06 +00:00
Zhongxing Xu 54fb536b5c A further step of r73690: associate the cast-to type with the created symbol,
because the type of the symbol is used to create the default range. We need the
sign to be consistent.

llvm-svn: 73756
2009-06-19 06:00:32 +00:00
Zhongxing Xu cc45762253 If the SymbolicRegion was cast to another type, use that type to create the
ElementRegion.

llvm-svn: 73754
2009-06-19 04:51:14 +00:00
Zhongxing Xu b21175ccbe Modify test case comments.
llvm-svn: 73691
2009-06-18 06:49:35 +00:00
Zhongxing Xu cea6578078 When casting region, if we do not create an element region, record the cast-to
type. 

When retrieving the region value, if we are going to create a symbol value, use
the cast-to type if possible.

llvm-svn: 73690
2009-06-18 06:29:10 +00:00
Zhongxing Xu afc875c766 Replace the heuristic isSmallerThan with ASTContext::getTypeSize().
llvm-svn: 71206
2009-05-08 02:12:59 +00:00
Ted Kremenek 9c21f1d174 StoreManager::CastRegion:
- Don't layer TypedViewRegions on top of any region except
  SymbolicRegions and AllocaRegions.  This follows from my offline
  discussion within Zhongxing about how TypedViewRegions really only
  represent memory getting re-appropriated for a new purpose.

Fallout	from this change:
- Move test case from xfail_rdar_6440393.m to misc-ps-64.m
  (it now passes).

- test/Analysis/fields.c now fails for region store (crash).
  Marking XFAIL.

- test/Analysis/rdar-6441136-region.c now fails (only runs with region store).
  Marking XFAIL.

  Diagnosis: The analyzer now correctly identifies an early out-of-bounds memory
   access then the one flagged:

  rdar-6541136-region.c:17:3: warning: Load or store into an out-of-bound memory position.
    *p = 1;
    ^~

  Changing the line:
   char *p = (void*) &wonky[1];
  to
   char *p = (void*) &wonky[0];

  (which should delay the buffer overrun) causes region store to crash, probably
  because it expects a TypedViewRegion.

- test/Analysis/casts.c (region store) now fails (crash).
  Marking XFAIL.

llvm-svn: 70565
2009-05-01 19:22:20 +00:00
Zhongxing Xu 12233fd97e Added comments to test case.
llvm-svn: 70374
2009-04-29 05:59:48 +00:00
Zhongxing Xu 892a5f78eb Update test case.
llvm-svn: 70359
2009-04-29 02:37:26 +00:00
Zhongxing Xu c14f097f58 XFAIL the test case.
llvm-svn: 70356
2009-04-29 01:50:12 +00:00
Zhongxing Xu 3c3fee0fb8 Add test case.
llvm-svn: 70294
2009-04-28 13:52:13 +00:00