History log of /external/clang/test/Analysis/array-struct-region.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
11f0cae4bf4f62dcc706d33c1f795d460cd64816 21-Feb-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Tighten up safety in the use of lazy bindings.

- When deciding if we can reuse a lazy binding, make sure to check if there
are additional bindings in the sub-region.
- When reading from a lazy binding, don't accidentally strip off casts or
base object regions. This slows down lazy binding reading a bit but is
necessary for type sanity when treating one class as another.

A bit of minor refactoring allowed these two checks to be unified in a nice
early-return-using helper function.

<rdar://problem/13239840>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
978aeac1a90020b2a0ae6c7eb7fe65aa8226f74a 01-Feb-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Reuse a LazyCompoundVal if its type matches the new region.

This allows us to keep from chaining LazyCompoundVals in cases like this:
CGRect r = CGRectMake(0, 0, 640, 480);
CGRect r2 = r;
CGRect r3 = r2;

Previously we only made this optimization if the struct did not begin with
an aggregate member, to make sure that we weren't picking up an LCV for
the first field of the struct. But since LazyCompoundVals are typed, we can
make that inference directly by comparing types.

This is a pure optimization; the test changes are to guard against possible
future regressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
5255f27362ffbfedea889870bf8d5812dae97553 31-Jan-2013 Anna Zaks <ganna@apple.com> [analyzer] Fix a bug in region store that lead to undefined value false
positives.

The includeSuffix was only set on the first iteration through the
function, resulting in invalid regions being produced by getLazyBinding
(ex: zoomRegion.y).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
4e674f77150b52d8e6ae82faf64fbdac79d675d3 10-Nov-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] When invalidating symbolic offset regions, take fields into account.

Previously, RegionStore was being VERY conservative in saying that because
p[i].x and p[i].y have a concrete base region of 'p', they might overlap.
Now, we check the chain of fields back up to the base object and check if
they match.

This only kicks in when dealing with symbolic offset regions because
RegionStore's "base+offset" representation of concrete offset regions loses
all information about fields. In cases where all offsets are concrete
(s.x and s.y), RegionStore will already do the right thing, but mixing
concrete and symbolic offsets can cause bindings to be invalidated that
are known to not overlap (e.g. p[0].x and p[i].y).
This additional refinement is tracked by <rdar://problem/12676180>.

<rdar://problem/12530149>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.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/array-struct-region.c
e3f3825bd82f84f2a1ae0a02274a33298bb720b3 22-Aug-2012 Ted Kremenek <kremenek@apple.com> Remove BasicConstraintManager. It hasn't been in active service for a while.

As part of this change, I discovered that a few of our tests were not testing
the RangeConstraintManager. Luckily all of those passed when I moved them
over to use that constraint manager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
ee04959f88e26ed38dccf4aed2ff10cad1f703c9 21-Aug-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] -analyzer-ipa=inlining is now the default. Remove it from tests.

The actual change here is a little more complicated than the summary above.
What we want to do is have our generic inlining tests run under whatever
mode is the default. However, there are some tests that depend on the
presence of C++ inlining, which still has some rough edges. These tests have
been explicitly marked as -analyzer-ipa=inlining in preparation for a new
mode that limits inlining to C functions and blocks. This will be the
default until the false positives for C++ have been brought down to
manageable levels.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
e0d24eb1060a213ec9820dc02c45f26b2d5b348b 08-Aug-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Revamp RegionStore to distinguish regions with symbolic offsets.

RegionStore currently uses a (Region, Offset) pair to describe the locations
of memory bindings. However, this representation breaks down when we have
regions like 'array[index]', where 'index' is unknown. We used to store this
as (SubRegion, 0); now we mark them specially as (SubRegion, SYMBOLIC).

Furthermore, ProgramState::scanReachableSymbols depended on the existence of
a sub-region map, but RegionStore's implementation doesn't provide for such
a thing. Moving the store-traversing logic of scanReachableSymbols into the
StoreManager allows us to eliminate the notion of SubRegionMap altogether.

This fixes some particularly awkward broken test cases, now in
array-struct-region.c.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
48088ed56f406dc244f04f4e9164999b7a40e1fd 07-Jul-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Fix mis-committed test. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
752bee2493ec2931bd18899753552e3a47dc85fe 06-Jul-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Be careful about LazyCompoundVals, which may be for the first field.

We use LazyCompoundVals to avoid copying the contents of structs and arrays
around in the store, and when we need to pass a struct around that already
has a LazyCompoundVal we just use the original one. However, it's possible
that the first field of a struct may have a LazyCompoundVal of its own, and
we currently can't distinguish a LazyCompoundVal for the first element of a
struct from a LazyCompoundVal for the entire struct. In this case we should
just drop the optimization and make a new LazyCompoundVal that encompasses
the old one.

PR13264 / <rdar://problem/11802440>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
43d9f0d4e9b88dcab473a359a7b5579c2a619b22 16-May-2012 Jordy Rose <jediknil@belkadan.com> [analyzer] Convert many existing tests to use clang_analyzer_eval.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
be0ee875d8a91c031a085cbbd73ad9e8dc1aa8ff 15-May-2012 David Blaikie <dblaikie@gmail.com> Improve some of the conversion warnings to fire on conversion to bool.

Moves the bool bail-out down a little in SemaChecking - so now
-Wnull-conversion and -Wliteral-conversion can fire when the target type is
bool.

Also improve the wording/details in the -Wliteral-conversion warning to match
the -Wconstant-conversion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
f1139400e8015b3fc4bbb125df79d9fa1ca18bf6 12-May-2012 Jordy Rose <jediknil@belkadan.com> [analyzer] Test case: p->x is the same as p[0].x. (PR7297)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
e31b8fb25b458f00e31dcd657c0840e5238e0f05 05-Apr-2012 David Blaikie <dblaikie@gmail.com> Enable warn_impcast_literal_float_to_integer by default.

This diagnostic seems to be production ready, it's just an oversight that it
wasn't turned on by default.

The test changes are a bit of a mixed bag. Some tests that seemed like they
clearly didn't need to use this behavior have been modified not to use it.
Others that I couldn't be sure about, I added the necessary expected-warnings
to.

It's possible the diagnostic message could be improved to make it clearer that
this warning can be suppressed by using a value that won't lose precision when
converted to the target type (but can still be a floating point literal, such
as "bool b = 1.0;").

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.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/array-struct-region.c
5188507b9a1b09ec95c14ffadf0e832f2b47aa8a 24-Mar-2011 Ted Kremenek <kremenek@apple.com> Rework checker "packages" and groups to be more hierarchical.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.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/array-struct-region.c
6dd4dffe1090e820e9b5b25eee8ad3907a1aa679 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-experimental-checks' flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.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/array-struct-region.c
a0decc9a2481f938e1675b4f7bbd58761a882a36 15-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Use the new registration mechanism on some of the experimental checks. These are:

CStringChecker
ChrootChecker
MallocChecker
PthreadLockChecker
StreamChecker
UnreachableCodeChecker

MallocChecker creates implicit dependencies between checkers and needs to be handled differently.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
59b6dca7e5160d6f2aff42b1cf077d1cbd64e330 20-Aug-2010 Jordy Rose <jediknil@belkadan.com> Handle nested compound values in BindArray for multidimensional arrays. Fixes PR7945.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Analysis/array-struct-region.c
23b736e159e72f0237a888a6d4f7319d7e9e8867 29-Jul-2010 Jordy Rose <jediknil@belkadan.com> Move new test (that requires RegionStore) into its own file.


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