[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Analysis / diagnostics / find_last_store.c
blobe6162f5472cf21b3d96a3b843e150240d869dd14
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -verify %s
2 typedef struct { float b; } c;
3 void *a(void);
4 void *d(void) {
5 return a();
8 void no_find_last_store(void) {
9 c *e = d(); // expected-note{{'e' initialized here}}
11 (void)(e || e->b); // expected-note{{Assuming 'e' is null}}
12 // expected-note@-1{{Left side of '||' is false}}
13 // expected-note@-2{{Access to field 'b' results in a dereference of a null pointer (loaded from variable 'e')}}
14 // expected-warning@-3{{Access to field 'b' results in a dereference of a null pointer (loaded from variable 'e')}}