summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/std-c-library-functions.cpp
blob: e6ac66bc81a3f84cc64cbd6b5071fc0152b584e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -triple x86_64-unknown-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s

// Test that we don't model functions with broken prototypes.
// Because they probably work differently as well.
//
// This test lives in a separate file because we wanted to test all functions
// in the .c file, however in C there are no overloads.

void clang_analyzer_eval(bool);
bool isalpha(char);

void test() {
  clang_analyzer_eval(isalpha('A')); // no-crash // expected-warning{{UNKNOWN}}
}
OpenPOWER on IntegriCloud