diff options
Diffstat (limited to 'test/Analysis/array-struct.c')
-rw-r--r-- | test/Analysis/array-struct.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Analysis/array-struct.c b/test/Analysis/array-struct.c index 223069f925..c22f9796e5 100644 --- a/test/Analysis/array-struct.c +++ b/test/Analysis/array-struct.c @@ -175,3 +175,11 @@ void f18() { if (*q) { // no-warning } } + + +// [PR13927] offsetof replacement macro flagged as "dereference of a null pointer" +int offset_of_data_array(void) +{ + return ((char *)&(((struct s*)0)->data_array)) - ((char *)0); // no-warning +} + |