]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Analysis/nullability.c
Vendor import of clang trunk r290819:
[FreeBSD/FreeBSD.git] / test / Analysis / nullability.c
1 // RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=core,nullability -verify %s
2
3 void it_takes_two(int a, int b);
4 void function_pointer_arity_mismatch() {
5   void(*fptr)() = it_takes_two;
6   fptr(1); // no-crash expected-warning {{Function taking 2 arguments is called with fewer (1)}}
7 }
8
9 void block_arity_mismatch() {
10   void(^b)() = ^(int a, int b) { };
11   b(1);  // no-crash expected-warning {{Block taking 2 arguments is called with fewer (1)}}
12 }