1 // RUN: %clang_analyze_cc1 %s -verify \ 2 // RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctionArgs \ 3 // RUN: -analyzer-checker=core 4 5 typedef __typeof(sizeof(int)) size_t; 6 7 struct FILE; 8 typedef struct FILE FILE; 9 10 size_t fread(void *restrict, size_t, size_t, FILE *restrict) __attribute__((nonnull(1))); 11 f(FILE * F)12void f(FILE *F) { 13 int *p = 0; 14 fread(p, sizeof(int), 5, F); // expected-warning{{Null pointer passed to 1st parameter expecting 'nonnull' [core.NonNullParamChecker]}} 15 } 16