Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / PR49642.c
blob78bbde79d83006d0ebef5a5b3f24893f9153ab64
1 // RUN: %clang_analyze_cc1 -Wno-implicit-function-declaration -Wno-implicit-int -w -verify %s \
2 // RUN: -analyzer-checker=core \
3 // RUN: -analyzer-checker=unix.StdCLibraryFunctions
5 // expected-no-diagnostics
7 typedef ssize_t;
8 b;
10 unsigned c;
11 int write(int, const void *, unsigned long);
13 a() {
14 d();
15 while (c > 0) {
16 b = write(0, d, c);
17 if (b)
18 c -= b;
19 b < 1;
21 if (c && c) {
22 // ^ no-crash