ThiƩbaud Weksteen | e40e736 | 2020-10-28 15:03:00 +0100 | [diff] [blame] | 1 | // RUN: %clang_analyze_cc1 %s \ |
| 2 | // RUN: -analyzer-checker=core \ |
| 3 | // RUN: -analyzer-checker=apiModeling.StdCLibraryFunctions \ |
| 4 | // RUN: -analyzer-checker=alpha.unix.StdCLibraryFunctionArgs \ |
| 5 | // RUN: -analyzer-checker=debug.StdCLibraryFunctionsTester \ |
| 6 | // RUN: -analyzer-checker=debug.ExprInspection \ |
| 7 | // RUN: -analyzer-config eagerly-assume=false \ |
| 8 | // RUN: -triple i686-unknown-linux \ |
| 9 | // RUN: -verify |
| 10 | |
| 11 | void clang_analyzer_eval(int); |
| 12 | |
| 13 | int __defaultparam(void *, int y = 3); |
| 14 | |
| 15 | void test_arg_constraint_on_fun_with_default_param() { |
| 16 | __defaultparam(nullptr); // \ |
Chris Wailes | bcf972c | 2021-10-21 11:03:28 -0700 | [diff] [blame^] | 17 | // expected-warning{{Function argument constraint is not satisfied}} \ |
| 18 | // expected-note{{}} |
ThiƩbaud Weksteen | e40e736 | 2020-10-28 15:03:00 +0100 | [diff] [blame] | 19 | } |