diff options
Diffstat (limited to 'test/Analysis/std-c-library-functions.cpp')
-rw-r--r-- | test/Analysis/std-c-library-functions.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Analysis/std-c-library-functions.cpp b/test/Analysis/std-c-library-functions.cpp new file mode 100644 index 000000000000..e6ac66bc81a3 --- /dev/null +++ b/test/Analysis/std-c-library-functions.cpp @@ -0,0 +1,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}} +} |