Hidden checkers (those marked with Hidden in Checkers.td) are meant for development purposes only, and are only displayed under -analyzer-checker-help-developer, so users shouldn't see reports from them. I moved StdLibraryFunctionsArg checker to the unix package from apiModeling as it violated this rule. I believe this change doesn't deserve a different revision because it is in alpha, and the name is so bad anyways I don't immediately care where it is, because we'll have to revisit it soon enough. Differential Revision: https://reviews.llvm.org/D81750
19 lines
649 B
C++
19 lines
649 B
C++
// RUN: %clang_analyze_cc1 %s \
|
|
// RUN: -analyzer-checker=core \
|
|
// RUN: -analyzer-checker=apiModeling.StdCLibraryFunctions \
|
|
// RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctionArgs \
|
|
// RUN: -analyzer-checker=debug.StdCLibraryFunctionsTester \
|
|
// RUN: -analyzer-checker=debug.ExprInspection \
|
|
// RUN: -analyzer-config eagerly-assume=false \
|
|
// RUN: -triple i686-unknown-linux \
|
|
// RUN: -verify
|
|
|
|
void clang_analyzer_eval(int);
|
|
|
|
int __defaultparam(void *, int y = 3);
|
|
|
|
void test_arg_constraint_on_fun_with_default_param() {
|
|
__defaultparam(nullptr); // \
|
|
// expected-warning{{Function argument constraint is not satisfied}}
|
|
}
|