blob: 9a64ce4320b00505053bce7f8e377a27b731adcf [file] [log] [blame]
Ted Kremenek465172f2008-07-21 22:09:15 +00001// RUN: clang -fsyntax-only -verify %s
2
Ted Kremenek7fb43c12008-09-01 19:57:52 +00003int f1(int x) __attribute__((nonnull)); // expected-warning{{'nonnull' attribute applied to function with no pointer arguments}}
Ted Kremenek465172f2008-07-21 22:09:15 +00004int f2(int *x) __attribute__ ((nonnull (1)));
5int f3(int *x) __attribute__ ((nonnull (0))); // expected-error {{'nonnull' attribute parameter 1 is out of bounds}}
6int f4(int *x, int *y) __attribute__ ((nonnull (1,2)));
7int f5(int *x, int *y) __attribute__ ((nonnull (2,1)));
8