Mercurial > hg > CbC > CbC_llvm
annotate clang/test/Analysis/PR49642.c @ 222:81f6424ef0e3 llvm-original
LLVM original branch
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 18 Jul 2021 22:10:01 +0900 |
parents | 79ff65ed7e25 |
children | c4bab56944e8 |
rev | line source |
---|---|
221 | 1 // RUN: %clang_analyze_cc1 -w -verify %s \ |
2 // RUN: -analyzer-checker=core \ | |
3 // RUN: -analyzer-checker=apiModeling.StdCLibraryFunctions | |
4 | |
5 // expected-no-diagnostics | |
6 | |
7 typedef ssize_t; | |
8 b; | |
9 | |
10 unsigned c; | |
11 int write(int, const void *, unsigned long); | |
12 | |
13 a() { | |
14 d(); | |
15 while (c > 0) { | |
16 b = write(0, d, c); | |
17 if (b) | |
18 c -= b; | |
19 b < 1; | |
20 } | |
21 if (c && c) { | |
22 // ^ no-crash | |
23 } | |
24 } |