mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-30 07:46:06 +00:00

Because all our languages are C-based, there's no reason to enable this checker only on UNIX targets. Patch by Donát Nagy! Differential Revision: https://reviews.llvm.org/D52722 llvm-svn: 343632
15 lines
540 B
C++
15 lines
540 B
C++
// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=apiModeling.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}}
|
|
}
|