1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,apiModeling.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s
2 // RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=core,apiModeling.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s
3 // RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=core,apiModeling.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s
4 // RUN: %clang_analyze_cc1 -triple armv7-a15-linux -analyzer-checker=core,apiModeling.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s
5 // RUN: %clang_analyze_cc1 -triple thumbv7-a15-linux -analyzer-checker=core,apiModeling.StdCLibraryFunctions,debug.ExprInspection -verify -analyzer-config eagerly-assume=false %s
7 void clang_analyzer_eval(int);
9 typedef struct FILE FILE;
10 // Unorthodox EOF value.
14 void test_getc(FILE *fp
) {
17 while ((x
= getc(fp
)) != EOF
) {
18 clang_analyzer_eval(x
> 255); // expected-warning{{FALSE}}
19 clang_analyzer_eval(x
>= 0); // expected-warning{{TRUE}}
24 clang_analyzer_eval(y
== -2); // expected-warning{{TRUE}}