Debian Codegraph @

clang/test/Analysis/std-c-library-functions-arg-constraints.cpp

raw
1 // RUN: %clang_analyze_cc1 %s \
2 // RUN: -analyzer-checker=core \
3 // RUN: -analyzer-checker=unix.StdCLibraryFunctions \
4 // RUN: -analyzer-checker=debug.StdCLibraryFunctionsTester \
5 // RUN: -analyzer-checker=debug.ExprInspection \
6 // RUN: -analyzer-config eagerly-assume=false \
7 // RUN: -triple i686-unknown-linux \
8 // RUN: -verify
9
10 void clang_analyzer_eval(int);
11
12 int __defaultparam(void *, int y = 3);
13
14 void test_arg_constraint_on_fun_with_default_param() {
15 __defaultparam(nullptr); // \
16 // expected-warning{{The 1st argument to '__defaultparam' is NULL but should not be NULL}}
17 }