1 // RUN: %clang_cc1 -fsyntax-only -verify %s
5 __attribute__((returns_nonnull
))
6 void *value_dependent(void) {
7 return I
; // no-warning
10 __attribute__((returns_nonnull
))
11 void *value_independent(void) {
12 return 0; // expected-warning {{null returned from function that requires a non-null return value}}
17 template<typename T
> __attribute__((nonnull
)) void f(T t
);
18 void g() { f((void*)0); } // expected-warning {{null passed to a callee that requires a non-null argument}}