Lines Matching full:nonnull
1 // RUN: %clangxx -fsanitize=nonnull-attribute -fno-sanitize-recover=all %s -O3 -o %t
19 C(int *null, __attribute__((nonnull)) int *nonnull)
20 : null_(null), nonnull_(nonnull) {}
22 int method(int *nonnull, int *null) __attribute__((nonnull(2))) {
23 return *nonnull_ + *nonnull;
27 __attribute__((nonnull)) int func(int *nonnull) { return *nonnull; }
30 __attribute__((nonnull)) int variadic(int x, ...) {
33 int *nonnull = va_arg(args, int*);
34 int res = *nonnull;
45 // CTOR: {{.*}}nonnull-arg.cpp:[[@LINE-1]]:21: runtime error: null pointer passed as argument 2, which is declared to never be null
46 // CTOR-NEXT: {{.*}}nonnull-arg.cpp:19:31: note: nonnull attribute specified here
49 // METHOD: {{.*}}nonnull-arg.cpp:[[@LINE-1]]:36: runtime error: null pointer passed as argument 1, which is declared to never be null
50 // METHOD-NEXT: {{.*}}nonnull-arg.cpp:22:54: note: nonnull attribute specified here
53 // FUNC: {{.*}}nonnull-arg.cpp:[[@LINE-1]]:19: runtime error: null pointer passed as argument 1, which is declared to never be null
54 // FUNC-NEXT: {{.*}}nonnull-arg.cpp:27:16: note: nonnull attribute specified here
57 // VARIADIC: {{.*}}nonnull-arg.cpp:[[@LINE-1]]:27: runtime error: null pointer passed as argument 2, which is declared to never be null
58 // VARIADIC-NEXT: {{.*}}nonnull-arg.cpp:30:16: note: nonnull attribute specified here