Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / weak-dependencies.c
blob9d4b7b6defb3cec9654965fe056c95c095ce1e95
1 // RUN: %clang_analyze_cc1 %s -verify \
2 // RUN: -analyzer-checker=unix.StdCLibraryFunctions \
3 // RUN: -analyzer-checker=core
5 typedef __typeof(sizeof(int)) size_t;
7 struct FILE;
8 typedef struct FILE FILE;
10 size_t fread(void *restrict, size_t, size_t, FILE *restrict) __attribute__((nonnull(1)));
12 void 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]}}