History log of /external/clang/test/Analysis/casts.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/test/Analysis/casts.c
112344ab7f96cf482bce80530676712c282756d5 01-May-2013 Jordan Rose <jordan_rose@apple.com> Re-apply "[analyzer] Model casts to bool differently from other numbers."

This doesn't appear to be the cause of the slowdown. I'll have to try a
manual bisect to see if there's really anything there, or if it's just
the bot itself taking on additional load. Meanwhile, this change helps
with correctness.

This changes an assertion and adds a test case, then re-applies r180638,
which was reverted in r180714.

<rdar://problem/13296133> and PR15863

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
7e6b564d59df6c0594bc3a577f33536850290dec 29-Apr-2013 Jordan Rose <jordan_rose@apple.com> Revert "[analyzer] Model casts to bool differently from other numbers."

This seems to be causing quite a slowdown on our internal analyzer bot,
and I'm not sure why. Needs further investigation.

This reverts r180638 / 9e161ea981f22ae017b6af09d660bfc3ddf16a09.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
5e6c06bc7deaaefe130b730032a9acb9cd38bf0c 26-Apr-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Model casts to bool differently from other numbers.

Casts to bool (and _Bool) are equivalent to checks against zero,
not truncations to 1 bit or 8 bits.

This improved reasoning does cause a change in the behavior of the alpha
BoolAssignment checker. Previously, this checker complained about statements
like "bool x = y" if 'y' was known not to be 0 or 1. Now it does not, since
that conversion is well-defined. It's hard to say what the "best" behavior
here is: this conversion is safe, but might be better written as an explicit
comparison against zero.

More usefully, besides improving our model of booleans, this fixes spurious
warnings when returning the address of a local variable cast to bool.

<rdar://problem/13296133>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
beca02fc66db76eacdaced9df3bc79530c064842 05-Feb-2013 Anna Zaks <ganna@apple.com> [analyzer] Teach the analyzer to use a symbol for p when evaluating
(void*)p.

Addresses the false positives similar to the test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
8e8fb3be5bd78f0564444eca02b404566a5f3b5d 19-Oct-2012 Andy Gibbs <andyg1001@hotmail.co.uk> Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
cdc3a89d5de90b2299c56f4a46c3de590c5184d1 24-Aug-2012 Ted Kremenek <kremenek@apple.com> Fix analyzer tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
b3b1ae85757a8722caccb742b73ca31b4b53bb0a 10-May-2012 Anna Zaks <ganna@apple.com> [analyzer] Exit early if constraint solver is given a non-integer symbol
to reason about.

As part of taint propagation, we now allow creation of non-integer
symbolic expressions like a cast from int to float.

Addresses PR12511 (radar://11215362).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
033a07e5fca459ed184369cfee7c90d82367a93a 04-Aug-2011 Ted Kremenek <kremenek@apple.com> [analyzer] rename all experimental checker packages to have 'experimental' be the common root package.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
c4d2c9074be6eb2091086eddd6c8f052f3b245c8 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
65d39251ff57b8e33cf6d3a7fcc6aa1c6f8cdc68 24-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-experimental-internal-checks' flag, it doesn't have any checkers associated with it anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
565e465c6d0093f1bf8414b2cabdc842022385a9 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
33ec2f8bc5a19c3b026d80299394989a4f8b3a3d 14-Jan-2010 Ted Kremenek <kremenek@apple.com> Simplify test case. This test case also applies to PR 6013.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
74618dec963b43f6442c1780ea7795de707a1cef 14-Jan-2010 Ted Kremenek <kremenek@apple.com> Associate test case with Bugzilla PR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
7b81e8fe6f8576340af7899c1828f1af0781d775 14-Jan-2010 Zhongxing Xu <xuzhongxing@gmail.com> Fix pr6035.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
e030358cc06e1cbce3c2e00ca67c946f9164b2a8 09-Jan-2010 Chris Lattner <sabre@nondot.org> add a bunch of missing prototypes to tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
6607aca723992d364f2de15f5d739aae8c2a6469 05-Jan-2010 Zhongxing Xu <xuzhongxing@gmail.com> Move test case to a more appropriate file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> 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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
ef74f4c6dcd59b3af1de9d8f613c1caf3e6cb63d 14-Dec-2009 Zhongxing Xu <xuzhongxing@gmail.com> Replace clang-cc with clang -cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
8a90ac0e85e8c5758b585fe486ee7db01c53fb98 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Normalize options to use '-FOO' instead of '--FOO'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
8382cf57b722f130f1a6b45380639871c07271c1 13-Nov-2009 Ted Kremenek <kremenek@apple.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
18e7a3d403d4271408aceb406d0e50110832f5d8 14-Oct-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add comments to test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
caac0899b528102b88a7d49d3324d7b39d2ae88d 20-Aug-2009 Ted Kremenek <kremenek@apple.com> Make this test case more portable by removing its dependency on system header files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79511 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
9668b1f6c87bd8d9af87e29900508a52584404ef 31-Jul-2009 Anders Carlsson <andersca@mac.com> 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
959922647e5061fc20f983d0e85e3f7fb8421457 21-Jul-2009 Mike Stump <mrs@apple.com> Prep for new warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
88bd3406013a491fd628610be2d74f9063cfdb05 11-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Fix silly mistake I made applying patch to fix test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
cb52d28946367cec72ce6225a175939e234353b5 10-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Misc fixes to fix tests on OpenBSD, per email to cfe-commits. Patches
by Jonathan Gray and Krister Walfridsson.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
45257c37a4e9a8f915661e0f964aec375909eb4c 19-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
005f07b874ae559047f6189e2f770739695f6779 19-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> If the SymbolicRegion was cast to another type, use that type to create the
ElementRegion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
59c03ff2a686baa88a2e69c7f6fdf1a36b716190 18-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> Modify test case comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
88c675f001e046b7264e2a2d4174dacf3781ce5f 18-Jun-2009 Zhongxing Xu <xuzhongxing@gmail.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
fb1e3310da7e3886c8057a5f009d2cdf30d8804f 08-May-2009 Zhongxing Xu <xuzhongxing@gmail.com> Replace the heuristic isSmallerThan with ASTContext::getTypeSize().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
a8607d13c8df25a8c10d46db016d26f9e327418d 01-May-2009 Ted Kremenek <kremenek@apple.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
b1080ed5016db4466fbe69d771c05672de39ec3e 29-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Added comments to test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
622310792eb2504c8431ca5ea74477af11b95677 29-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Update test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
2fc3259293282a428f71520805720ecc9e50af9f 29-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> XFAIL the test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c
c58e785c33b5d9d1f8c21760de9cf1f1bc5d983c 28-Apr-2009 Zhongxing Xu <xuzhongxing@gmail.com> Add test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/casts.c