null-deref-ps-region.c revision cdc3a89d5de90b2299c56f4a46c3de590c5184d1
1// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -std=gnu99 -analyzer-store=region -verify %s 2 3 4// The store for 'a[1]' should not be removed mistakenly. SymbolicRegions may 5// also be live roots. 6void f14(int *a) { 7 int i; 8 a[1] = 1; 9 i = a[1]; 10 if (i != 1) { 11 int *p = 0; 12 i = *p; // no-warning 13 } 14} 15