18 lines · cpp
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: -verify9 10void clang_analyzer_eval(int);11 12int __defaultparam(void *, int y = 3);13 14void 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}18