diff options
Diffstat (limited to 'test/Analysis/array-struct-region.c')
-rw-r--r-- | test/Analysis/array-struct-region.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/Analysis/array-struct-region.c b/test/Analysis/array-struct-region.c index d628c47cb0..c4d9aff95f 100644 --- a/test/Analysis/array-struct-region.c +++ b/test/Analysis/array-struct-region.c @@ -253,6 +253,19 @@ int testStructFieldChainsNested(int index, int anotherIndex) { return 0; } +typedef struct { + int zoomLevel; + struct point center; +} Outer; + +extern int test13116945(struct point x); +static void radar13116945(struct point centerCoordinate) { + Outer zoomRegion; + zoomRegion.zoomLevel = 0; + zoomRegion.center = centerCoordinate; + Outer r = zoomRegion; + test13116945(r.center); // no-warning +} // -------------------- // False positives @@ -289,4 +302,3 @@ void testFieldChainIsNotEnough(int index) { // FIXME: Should be TRUE. clang_analyzer_eval(vals[index].a[0].x == 42); // expected-warning{{UNKNOWN}} } - |