Home
last modified time | relevance | path

Searched refs:_Nonnull (Results 1 – 25 of 118) sorted by relevance

12345

/external/llvm-project/clang/test/Sema/
Dnullability.c15 typedef int * _Nonnull nonnull_int_ptr;
20 typedef int * _Nonnull _Nonnull redundant_1; // expected-warning{{duplicate nullability specifier '…
23 typedef int * _Nonnull _Nullable conflicting_1; // expected-error{{nullability specifier '_Nullable…
24 typedef int * _Null_unspecified _Nonnull conflicting_2; // expected-error{{nullability specifier '_…
27 typedef nonnull_int_ptr _Nonnull redundant_okay_1;
42 typedef int (* _Nonnull function_pointer_type_1)(int, int);
43 typedef int (^ _Nonnull block_type_1)(int, int);
46 typedef int _Nonnull int_type_1; // expected-error{{nullability specifier '_Nonnull' cannot be appl…
50 typedef _Nonnull int * nonnull_int_ptr_2;
52 typedef _Nonnull int (* function_pointer_type_2)(int, int);
[all …]
Dnon-null-warning.c10 int * _Nullable foo(int * _Nonnull x);
12 int *_Nonnull ret_nonnull();
18 int * _Nullable foo1(int * _Nonnull x); // expected-note {{previous declaration is here}}
24 int * _Nullable foo2(int * _Nonnull x);
26 int *foo2(int * _Nonnull x) { in foo2()
32 int *foo3(int * _Nonnull x) { // expected-warning {{nullability specifier '_Nonnull' conflicts with… in foo3()
/external/clang/test/Sema/
Dnullability.c15 typedef int * _Nonnull nonnull_int_ptr;
20 typedef int * _Nonnull _Nonnull redundant_1; // expected-warning{{duplicate nullability specifier '…
23 typedef int * _Nonnull _Nullable conflicting_1; // expected-error{{nullability specifier '_Nonnull'…
24 typedef int * _Null_unspecified _Nonnull conflicting_2; // expected-error{{nullability specifier '_…
27 typedef nonnull_int_ptr _Nonnull redundant_okay_1;
42 typedef int (* _Nonnull function_pointer_type_1)(int, int);
43 typedef int (^ _Nonnull block_type_1)(int, int);
46 typedef int _Nonnull int_type_1; // expected-error{{nullability specifier '_Nonnull' cannot be appl…
50 typedef _Nonnull int * nonnull_int_ptr_2;
52 typedef _Nonnull int (* function_pointer_type_2)(int, int);
[all …]
Dnon-null-warning.c10 int * _Nullable foo(int * _Nonnull x);
12 int *_Nonnull ret_nonnull();
18 int * _Nullable foo1(int * _Nonnull x); // expected-note {{previous declaration is here}}
24 int * _Nullable foo2(int * _Nonnull x);
26 int *foo2(int * _Nonnull x) { in foo2()
32 int *foo3(int * _Nonnull x) { // expected-warning {{nullability specifier '_Nonnull' conflicts with… in foo3()
/external/llvm-project/clang/test/SemaCXX/
Dnullability.cpp16 typedef int (X::* _Nonnull member_function_type_1)(int);
17 typedef int X::* _Nonnull member_data_type_1;
18 typedef nullptr_t _Nonnull nonnull_nullptr_t; // expected-error{{nullability specifier '_Nonnull' c…
21 typedef _Nonnull int (X::* member_function_type_2)(int);
22 typedef int (X::* _Nonnull member_function_type_3)(int);
23 typedef _Nonnull int X::* member_data_type_2;
28 …typedef _Nonnull T type; // expected-error{{nullability specifier '_Nonnull' cannot be applied to …
41 …typedef _Nonnull AddNonNull<T> invalid1; // expected-error{{nullability specifier '_Nonnull' canno…
42 …typedef _Nonnull AddNonNull2 invalid2; // expected-error{{nullability specifier '_Nonnull' cannot …
43 …typedef _Nonnull AddNonNull2<T> invalid3; // expected-error{{nullability specifier '_Nonnull' cann…
[all …]
/external/clang/test/SemaCXX/
Dnullability.cpp14 typedef int (X::* _Nonnull member_function_type_1)(int);
15 typedef int X::* _Nonnull member_data_type_1;
16 typedef nullptr_t _Nonnull nonnull_nullptr_t; // expected-error{{nullability specifier '_Nonnull' c…
19 typedef _Nonnull int (X::* member_function_type_2)(int);
20 typedef int (X::* _Nonnull member_function_type_3)(int);
21 typedef _Nonnull int X::* member_data_type_2;
26 …typedef _Nonnull T type; // expected-error{{nullability specifier '_Nonnull' cannot be applied to …
39 …typedef _Nonnull AddNonNull<T> invalid1; // expected-error{{nullability specifier '_Nonnull' canno…
40 …typedef _Nonnull AddNonNull2 invalid2; // expected-error{{nullability specifier '_Nonnull' cannot …
41 …typedef _Nonnull AddNonNull2<T> invalid3; // expected-error{{nullability specifier '_Nonnull' cann…
[all …]
/external/llvm-project/clang/test/SemaObjCXX/Inputs/
Dnullability-consistency-arrays.h17 int *_Nonnull triggerConsistencyWarnings;
44 int ints[_Nonnull],
45 void *ptrs[_Nonnull], // expected-warning {{pointer is missing a nullability type specifier}}
48 …void **nestedPtrs[_Nonnull]); // expected-warning 2 {{pointer is missing a nullability type specif…
52 int ints[_Nonnull],
53 void * _Nullable ptrs[_Nonnull],
54 void * _Nullable * _Nullable nestedPtrs[_Nonnull]);
73 pointer_like_or<va_list, void*>::type _Nonnull x); // no errors
82 void nestedArraysOK(int x[_Nonnull 5][1]) {}
99 INTS _Nonnull x2,
[all …]
Dnullability-consistency-8.h1 typedef int* _Nonnull mynonnull;
21 void cf3(CFTypeRef * _Nonnull p CF_RETURNS_NOT_RETAINED);
24 void cf5(CFTypeRef _Nonnull * _Nullable p CF_RETURNS_NOT_RETAINED);
27 void cf7(CF_RETURNS_NOT_RETAINED CFTypeRef * _Nonnull p);
33 void cfp2(CFTypeRefPtr _Nonnull p CF_RETURNS_NOT_RETAINED);
/external/llvm-project/clang/test/FixIt/
Dnullability.mm12 extern void *array[2]; // expected-warning {{inferring '_Nonnull' for pointer type within array is …
13 // CHECK: fix-it:"{{.*}}nullability.mm":{[[@LINE-1]]:14-[[@LINE-1]]:14}:" _Nonnull "
15 extern void* array2[2]; // expected-warning {{inferring '_Nonnull' for pointer type within array is…
16 // CHECK: fix-it:"{{.*}}nullability.mm":{[[@LINE-1]]:13-[[@LINE-1]]:13}:" _Nonnull"
18 extern void *nestedArray[2][3]; // expected-warning {{inferring '_Nonnull' for pointer type within …
19 // CHECK: fix-it:"{{.*}}nullability.mm":{[[@LINE-1]]:14-[[@LINE-1]]:14}:" _Nonnull "
25 extern PTR(void) array[2]; // expected-warning {{inferring '_Nonnull' for pointer type within array…
30 extern CFTypeRef typedefArray[2]; // expected-warning {{inferring '_Nonnull' for pointer type withi…
31 // CHECK: fix-it:"{{.*}}nullability.mm":{[[@LINE-1]]:17-[[@LINE-1]]:17}:" _Nonnull"
34 extern void *&ref; // expected-warning {{inferring '_Nonnull' for pointer type within reference is …
[all …]
/external/llvm-project/clang/test/Analysis/
Dnullability-no-arc.mm20 TestObject *_Nonnull returnsNilObjCInstanceIndirectly() {
25 TestObject * _Nonnull returnsNilObjCInstanceIndirectlyWithSupressingCast() {
27 return (TestObject * _Nonnull)local; // no-warning
30 TestObject * _Nonnull returnsNilObjCInstanceDirectly() {
36 TestObject * _Nonnull returnsNilObjCInstanceDirectlyWithSuppressingCast() {
37 return (TestObject * _Nonnull)nil; // no-warning
40 void testObjCNonARCNoInitialization(TestObject * _Nonnull p) {
41 TestObject * _Nonnull implicitlyZeroInitialized; // no-warning
46 …TestObject * _Nonnull explicitlyZeroInitialized = nil; // expected-warning {{nil assigned to a poi…
53 - (instancetype _Nonnull)initWithNonnullReturnAndSelfCheckingIdiom {
[all …]
Dnullability.mm38 - (int *_Nonnull)returnsNonnull;
41 - (void)takesNonnull:(int *_Nonnull)p; argument
48 TestObject *_Nonnull getNonnullTestObject();
56 void takesNonnull(Dummy *_Nonnull);
60 Dummy *_Nonnull returnsNonnull();
108 Dummy *_Nonnull nonnull = &a;
115 void testMultiParamChecking(Dummy *_Nonnull a, Dummy *_Nullable b,
116 Dummy *_Nonnull c);
118 void testArgumentTracking(Dummy *_Nonnull nonnull, Dummy *_Nullable nullable) {
130 case 9: testMultiParamChecking((Dummy *_Nonnull)0, nullable, nonnull); break;
[all …]
Dtrustnonnullchecker_test.m10 NSString* _Nonnull trust_nonnull_framework_annotation() {
16 NSString* _Nonnull trust_instancemsg_annotation(NSString* _Nonnull param) {
22 NSString* _Nonnull distrust_instancemsg_noannotation(NSString* param) {
29 NSString* _Nonnull trust_analyzer_knowledge(NSString* param) {
37 NSString* _Nonnull trust_assume_nonnull_macro() {
43 NSString* _Nonnull distrust_without_annotation() {
49 NSString* _Nonnull nonnull_please_trust_me();
51 NSString* _Nonnull distrust_local_nonnull_annotation() {
57 NSString* _Nonnull trust_c_function() {
63 NSString* _Nonnull distrust_unannoted_function() {
[all …]
Dnullability_nullonly.mm11 void takesNonnull(Dummy *_Nonnull);
25 Dummy *_Nonnull testNullReturn() {
40 Dummy *_Nonnull doNotWarnWhenPreconditionIsViolatedInTopFunc(
41 Dummy *_Nonnull p) {
54 Dummy *_Nonnull doNotWarnWhenPreconditionIsViolated(Dummy *_Nonnull p) {
74 void inlinedNonnull(Dummy *_Nonnull p) {
81 Dummy *_Nonnull testDefensiveInlineChecks(Dummy * p) {
95 TestObject *_Nonnull getNonnullTestObject();
98 TestObject * _Nonnull implicitlyZeroInitialized; // no-warning
103 …TestObject * _Nonnull explicitlyZeroInitialized = nil; // expected-warning {{nil assigned to a poi…
[all …]
/external/clang/test/Analysis/
Dnullability-no-arc.mm20 TestObject * _Nonnull returnsNilObjCInstanceIndirectly() {
25 TestObject * _Nonnull returnsNilObjCInstanceIndirectlyWithSupressingCast() {
27 return (TestObject * _Nonnull)local; // no-warning
30 TestObject * _Nonnull returnsNilObjCInstanceDirectly() {
36 TestObject * _Nonnull returnsNilObjCInstanceDirectlyWithSuppressingCast() {
37 return (TestObject * _Nonnull)nil; // no-warning
40 void testObjCNonARCNoInitialization(TestObject * _Nonnull p) {
41 TestObject * _Nonnull implicitlyZeroInitialized; // no-warning
46 …TestObject * _Nonnull explicitlyZeroInitialized = nil; // expected-warning {{Null is assigned to a…
53 - (instancetype _Nonnull)initWithNonnullReturnAndSelfCheckingIdiom {
[all …]
Dnullability.mm7 - (int *_Nonnull)returnsNonnull;
10 - (void)takesNonnull:(int *_Nonnull)p; argument
17 TestObject *_Nonnull getNonnullTestObject();
25 void takesNonnull(Dummy *_Nonnull);
29 Dummy *_Nonnull returnsNonnull();
77 Dummy *_Nonnull nonnull = &a;
84 void testMultiParamChecking(Dummy *_Nonnull a, Dummy *_Nullable b,
85 Dummy *_Nonnull c);
87 void testArgumentTracking(Dummy *_Nonnull nonnull, Dummy *_Nullable nullable) {
99 case 9: testMultiParamChecking((Dummy *_Nonnull)0, nullable, nonnull); break;
[all …]
Dnullability_nullonly.mm11 void takesNonnull(Dummy *_Nonnull);
25 Dummy *_Nonnull testNullReturn() {
40 Dummy *_Nonnull doNotWarnWhenPreconditionIsViolatedInTopFunc(
41 Dummy *_Nonnull p) {
54 Dummy *_Nonnull doNotWarnWhenPreconditionIsViolated(Dummy *_Nonnull p) {
74 void inlinedNonnull(Dummy *_Nonnull p) {
81 Dummy *_Nonnull testDefensiveInlineChecks(Dummy * p) {
95 TestObject *_Nonnull getNonnullTestObject();
98 TestObject * _Nonnull implicitlyZeroInitialized; // no-warning
103 …TestObject * _Nonnull explicitlyZeroInitialized = nil; // expected-warning {{Null is assigned to a…
[all …]
/external/llvm-project/compiler-rt/test/ubsan/TestCases/Misc/
Dnullability.c14 int *_Nonnull nonnull_retval1(int *p) { return p; } in nonnull_retval1()
18 int *_Nonnull nonnull_retval2(int *_Nonnull arg1, int *_Nonnull arg2, in nonnull_retval2()
25 void nonnull_arg(int *_Nonnull p) {} in nonnull_arg()
28 int *_Nonnull local; in nonnull_assign1()
34 int *_Nonnull arr[1]; in nonnull_assign2()
40 int *_Nonnull mptr;
50 void nonnull_init1(int *p) { int *_Nonnull local = p; } in nonnull_init1()
54 void nonnull_init2(int *p) { int *_Nonnull arr[] = {p, p}; } in nonnull_init2()
/external/clang/test/SemaObjC/
Dnullability.m5 - (void)methodTakingIntPtr:(_Nonnull int *)ptr;
6 - (_Nonnull int *)methodReturningIntPtr;
10 typedef NSFoo * _Nonnull nonnull_NSFoo_ptr;
11 typedef id _Nonnull nonnull_id;
12 typedef SEL _Nonnull nonnull_SEL;
15 typedef _Nonnull NSFoo * nonnull_NSFoo_ptr_2;
18 typedef _Nonnull NSFoo * _Nullable conflict_NSFoo_ptr_2; // expected-error{{'_Nonnull' cannot be ap…
24 // Check returning nil from a _Nonnull-returning method.
26 - (void)methodTakingIntPtr:(_Nonnull int *)ptr { }
27 - (_Nonnull int *)methodReturningIntPtr {
[all …]
Dblock-omitted-return-type.m13 …void (^simpleBlock)() = ^ _Nonnull { //expected-warning {{attribute '_Nonnull' ignored, because it…
16 …void (^simpleBlock2)() = ^ _Nonnull void { //expected-error {{nullability specifier '_Nonnull' can…
19 …void (^simpleBlock3)() = ^ _Nonnull (void) { //expected-warning {{attribute '_Nonnull' ignored, b…
32 …void (^simpleBlock7)() = ^ _Nonnull __attribute__((align_value(128))) _Nullable const (void) { // …
33 …// expected-warning {{attribute '_Nonnull' ignored, because it cannot be applied to omitted return…
38 …9)() = ^ __attribute__ ((align_value(128))) _Nonnull const (void) { // expected-warning {{attribut…
/external/llvm-project/clang/test/SemaObjC/
Dnullability.m5 - (void)methodTakingIntPtr:(_Nonnull int *)ptr;
6 - (_Nonnull int *)methodReturningIntPtr;
10 typedef NSFoo * _Nonnull nonnull_NSFoo_ptr;
11 typedef id _Nonnull nonnull_id;
12 typedef SEL _Nonnull nonnull_SEL;
15 typedef _Nonnull NSFoo * nonnull_NSFoo_ptr_2;
18 typedef _Nonnull NSFoo * _Nullable conflict_NSFoo_ptr_2; // expected-error{{'_Nonnull' cannot be ap…
24 // Check returning nil from a _Nonnull-returning method.
26 - (void)methodTakingIntPtr:(_Nonnull int *)ptr { }
27 - (_Nonnull int *)methodReturningIntPtr {
[all …]
Dblock-omitted-return-type.m13 …void (^simpleBlock)() = ^ _Nonnull { //expected-warning {{attribute '_Nonnull' ignored, because it…
16 …void (^simpleBlock2)() = ^ _Nonnull void { //expected-error {{nullability specifier '_Nonnull' can…
19 …void (^simpleBlock3)() = ^ _Nonnull (void) { //expected-warning {{attribute '_Nonnull' ignored, b…
32 …void (^simpleBlock7)() = ^ _Nonnull __attribute__((align_value(128))) _Nullable const (void) { // …
33 …// expected-warning {{attribute '_Nonnull' ignored, because it cannot be applied to omitted return…
38 …9)() = ^ __attribute__ ((align_value(128))) _Nonnull const (void) { // expected-warning {{attribut…
/external/perfetto/src/profiling/memory/include/perfetto/
Dheap_profile.h71 #define _Nonnull macro
87 const AHeapProfileEnableCallbackInfo* _Nonnull session_info);
102 AHeapInfo* _Nullable AHeapInfo_create(const char* _Nonnull heap_name);
112 void (*_Nonnull callback)(
114 const AHeapProfileEnableCallbackInfo* _Nonnull session_info),
125 void (*_Nonnull callback)(
127 const AHeapProfileDisableCallbackInfo* _Nonnull session_info),
/external/llvm-project/clang/test/CodeGenObjC/
Dubsan-nullability.m17 #define INNULL ((int *_Nonnull)NULL)
21 int *_Nonnull nonnull_retval1(int *p) {
30 void nonnull_arg(int *_Nonnull p) {}
34 void call_func_with_nonnull_arg(int *_Nonnull p) {
47 int *_Nonnull local;
57 int *_Nonnull arr[1];
62 int *_Nonnull mptr;
82 int *_Nonnull local = p;
94 int *_Nonnull arr[] = {p, p};
99 int *_Nonnull nonnull_retval2(int *_Nonnull arg1, //< Test this.
[all …]
/external/clang/test/SemaObjCXX/Inputs/
Dnullability-consistency-8.h1 typedef int* _Nonnull mynonnull;
17 void cf3(CFTypeRef * _Nonnull p CF_RETURNS_NOT_RETAINED);
20 void cf5(CFTypeRef _Nonnull * _Nullable p CF_RETURNS_NOT_RETAINED);
23 void cf7(CF_RETURNS_NOT_RETAINED CFTypeRef * _Nonnull p);
27 void cfp2(CFTypeRefPtr _Nonnull p CF_RETURNS_NOT_RETAINED);
/external/clang/test/SemaObjCXX/
Dnullability-pragmas.mm15 void test_pragmas_1(A * _Nonnull a, AA * _Nonnull aa) {
31 …alize a parameter of type 'NSError * _Nullable * _Nullable' with an lvalue of type 'A * _Nonnull'}}
32 …type 'NSErrorPtr _Nullable * _Nullable' (aka 'NSError **') with an lvalue of type 'A * _Nonnull'}}
35 …ptr = f13(); // expected-error{{assigning to 'float *' from incompatible type 'int_ptr _Nonnull' (…
36 ptr = f14(); // expected-error{{assigning to 'float *' from incompatible type 'A * _Nonnull'}}
37 … = [a method1:a]; // expected-error{{assigning to 'float *' from incompatible type 'A * _Nonnull'}}
38 ptr = a.aProp; // expected-error{{assigning to 'float *' from incompatible type 'A * _Nonnull'}}
39 …global_int_ptr; // expected-error{{assigning to 'float *' from incompatible type 'int * _Nonnull'}}
45 ptr = aa->ivar2; // expected-error{{from incompatible type 'id _Nonnull'}}

12345