1 // RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core -verify %s
3 void nonnull
[[gnu::nonnull
]] (int *q
);
8 nonnull(p
); //expected-warning{{nonnull}}
14 auto lambda
= [](int *q
) __attribute__((nonnull
)){};
15 lambda(p
); //expected-warning{{nonnull}}
18 template <class... ARGS
>
19 void variadicNonnull(ARGS
... args
) __attribute__((nonnull
));
21 void f3(int a
, float b
, int *p
) {
24 variadicNonnull(a
, b
, p
); //expected-warning{{nonnull}}
28 void moreParamsThanArgs
[[gnu::nonnull(2, 4)]] (int a
, int *p
, int b
= 42, int *q
= &globalVar
);
30 void f4(int a
, int *p
) {
33 moreParamsThanArgs(a
, p
); //expected-warning{{nonnull}}