/external/clang/test/Analysis/ |
D | nonnull.m | 4 - (void)takePointer:(void *)ptr __attribute__((nonnull(1))); argument 5 - (void)takePointerArg:(void *)__attribute__((nonnull)) ptr; argument 12 [obj takePointer:p]; // expected-warning{{nonnull}} 17 // [[nonnull]] is an inherited attribute. 24 [obj takePointer:p]; // expected-warning{{nonnull}} 30 [obj takePointerArg:p]; // expected-warning{{nonnull}} 73 extern void rdar16153464_check(union rdar16153464_pub_ctx_t outer) __attribute((nonnull(1))); 76 rdar16153464_check(0); // expected-warning{{nonnull}} 80 void multipleAttributes_1(char *p, char *q) __attribute((nonnull(1))) __attribute((nonnull(2))); 89 multipleAttributes_1(0, &c); // expected-warning{{nonnull}} [all …]
|
D | nullability.mm | 53 void takesAttrNonnull(Dummy *p) __attribute((nonnull(1))); 95 Dummy *_Nonnull nonnull = &a; 96 nonnull = q; // expected-warning {{}} 105 void testArgumentTracking(Dummy *_Nonnull nonnull, Dummy *_Nullable nullable) { 107 Dummy *q = nonnull; 109 case 1: nonnull = p; break; // expected-warning {{}} 112 case 4: testMultiParamChecking(nonnull, nullable, nonnull); break; 113 case 5: testMultiParamChecking(nonnull, nonnull, nonnull); break; 114 case 6: testMultiParamChecking(nonnull, nullable, nullable); break; // expected-warning {{}} 115 case 7: testMultiParamChecking(nullable, nullable, nonnull); // expected-warning {{}} [all …]
|
D | null-deref-ps.c | 88 int bar(int* p, int q) __attribute__((nonnull)); 95 int bar2(int* p, int q) __attribute__((nonnull(1))); 102 int bar3(int*p, int q, int *r) __attribute__((nonnull(1,3))); 285 void pr4759_aux(int *p) __attribute__((nonnull));
|
/external/clang/test/Sema/ |
D | nonnull.c | 12 __attribute__((nonnull(1))) void Class_init(Instance this, char *str) { in Class_init() 22 void foo(const char *str) __attribute__((nonnull("foo"))); // expected-error{{'nonnull' attribute r… 23 void bar(int i) __attribute__((nonnull(1))); // expected-warning {{'nonnull' attribute only applies… 25 void baz(__attribute__((nonnull)) const char *str); 26 void baz2(__attribute__((nonnull(1))) const char *str); // expected-warning {{'nonnull' attribute w… 27 void baz3(__attribute__((nonnull)) int x); // expected-warning {{'nonnull' attribute only applies t… 39 int i __attribute__((nonnull)); // expected-warning {{'nonnull' attribute only applies to functions… 49 void PR18795(int (*g)(const char *h, ...) __attribute__((nonnull(1))) __attribute__((nonnull))) { in PR18795() 56 void vararg1(int n, ...) __attribute__((nonnull(2))); 64 void vararg2(int n, ...) __attribute__((nonnull, nonnull, nonnull)); [all …]
|
D | attr-nonnull.c | 5 …int *a15, int *a16) __attribute__((nonnull(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))… 7 void f2(void) __attribute__((nonnull())); // expected-warning {{'nonnull' attribute applied to func…
|
/external/compiler-rt/test/ubsan/TestCases/Misc/ |
D | nonnull-arg.cpp | 19 C(int *null, __attribute__((nonnull)) int *nonnull) in C() argument 20 : null_(null), nonnull_(nonnull) {} in C() 22 int method(int *nonnull, int *null) __attribute__((nonnull(2))) { in method() argument 23 return *nonnull_ + *nonnull; in method() 27 __attribute__((nonnull)) int func(int *nonnull) { return *nonnull; } in func() argument 30 __attribute__((nonnull)) int variadic(int x, ...) { in variadic() 33 int *nonnull = va_arg(args, int*); in variadic() local 34 int res = *nonnull; in variadic()
|
/external/clang/test/CodeGen/ |
D | nonnull.c | 4 void foo(int * __attribute__((nonnull)) x) { in foo() 9 void bar(int * x) __attribute__((nonnull(1))) { in bar() 14 void bar2(int * x, int * y) __attribute__((nonnull(2))) { in bar2() 25 int bar4(int n, int *p) __attribute__((nonnull)) { in bar4() 30 int bar5(int n, int *p) __attribute__((nonnull(1, 2))) { in bar5() 41 int bar6(TransparentUnion tu) __attribute__((nonnull(1))) { in bar6() 46 void bar7(int *a, int *b) __attribute__((nonnull(1))) in bar7() 47 __attribute__((nonnull(2))) {} in bar7() 50 void bar8(int *a, int *b) __attribute__((nonnull)) in bar8() 51 __attribute__((nonnull(1))) {} in bar8()
|
D | catch-undef-behavior.c | 379 __attribute__((nonnull)) void decl_nonnull(int *a); 391 extern void *memcpy (void *, const void *, unsigned) __attribute__((nonnull(1, 2))); 405 extern void *memmove (void *, const void *, unsigned) __attribute__((nonnull(1, 2))); 420 __attribute__((nonnull)) void nonnull_variadic(int a, ...);
|
/external/clang/test/SemaCXX/ |
D | attr-nonnull.cpp | 3 S(const char *) __attribute__((nonnull(2))); 5 static void f(const char*, const char*) __attribute__((nonnull(1))); 9 void g(const char*, const char*, const char*) __attribute__((nonnull(3))); 11 void h(const char*) __attribute__((nonnull(1))); // \ 25 __attribute__((nonnull)) void f0(int *&p); 26 __attribute__((nonnull)) void f1(int * const &p); 27 __attribute__((nonnull(2))) void f2(int i, int * const &p); 36 __attribute__((nonnull(1))) void f(void *ptr); 46 bool operator!=(const void *) const __attribute__((nonnull(2))); 48 bool operator==(const X&, const void *) __attribute__((nonnull(2)));
|
D | nullability.cpp | 79 void *_Nonnull nonnull; in AssignAndInitNonNull() local 80 …nonnull = nullable; // expected-warning{{implicit conversion from nullable pointer 'void * _Nullab… in AssignAndInitNonNull() 81 …nonnull = {nullable}; // expected-warning{{implicit conversion from nullable pointer 'void * _Null… in AssignAndInitNonNull() 84 TakeNonnull(nonnull); // OK in AssignAndInitNonNull() 94 void *_Nonnull nonnull; in AssignAndInitNonNullFromFn() local 95 …nonnull = ReturnNullable(); // expected-warning{{implicit conversion from nullable pointer 'void *… in AssignAndInitNonNullFromFn() 96 …nonnull = {ReturnNullable()}; // expected-warning{{implicit conversion from nullable pointer 'void… in AssignAndInitNonNullFromFn()
|
/external/clang/test/SemaObjC/ |
D | nonnull.m | 1 #include "nonnull.h" 10 int f2(int *x) __attribute__ ((nonnull (1))); 11 int f3(int *x) __attribute__ ((nonnull (0))); // expected-error {{'nonnull' attribute parameter 1 i… 12 int f4(int *x, int *y) __attribute__ ((nonnull (1,2))); 13 int f5(int *x, int *y) __attribute__ ((nonnull (2,1))); 14 int f6(NSObject *x) __attribute__ ((nonnull (1))); // no-warning 15 int f7(NSObject *x) __attribute__ ((nonnull)); // no-warning 18 extern void func1 (void (^block1)(), void (^block2)(), int) __attribute__((nonnull)); 21 __attribute__((nonnull(1,3))); 23 extern void func4 (void (^block1)(), void (^block2)()) __attribute__((nonnull(1))) [all …]
|
D | nullability.m | 35 - (nonnull NSFoo *)methodWithFoo:(nonnull NSFoo *)foo; 37 - (nonnull NSFoo **)invalidMethod1; // expected-error{{nullability keyword 'nonnull' cannot be appl… 39 - (nonnull NSFoo * _Nullable)conflictingMethod1; // expected-error{{nullability specifier '_Nullabl… 40 - (nonnull NSFoo * _Nonnull)redundantMethod1; // expected-warning{{duplicate nullability specifier … 42 @property(nonnull,retain) NSFoo *property1; 46 @property(retain,nonnull) NSFoo * _Nonnull redundantProperty1; // expected-warning{{duplicate nulla… 53 @property(nonnull,retain) NSFoo *property2; category 57 @property(retain,nonnull) NSFoo * _Nonnull redundantProperty2; // expected-warning{{duplicate nulla… 70 // Check returning nil from a nonnull-returning method. 72 - (nonnull NSFoo *)methodWithFoo:(nonnull NSFoo *)foo { [all …]
|
D | override-nullability.m | 7 - (nonnull id)bad:(nullable id)obj; // expected-note 2 {{previous declaration is here}} 8 - (nullable id)notAsBad:(nonnull id)obj; 12 …bad:(nonnull id)obj; // expected-warning {{conflicting nullability specifier on return types, 'nul… 13 …xpected-warning {{conflicting nullability specifier on parameter types, 'nonnull' conflicts with e… 14 - (nonnull id)notAsBad:(nullable id)obj;
|
D | arc-property-decl-attrs.m | 91 @property(nonatomic, weak, nonnull) id NonNulldelete; // expected-error {{property attributes 'nonn… 97 @property(nonatomic, strong, nonnull) id stNonNulldelete; // Do not warn 104 @property(nonatomic, weak, nonnull) id delegate; // expected-error {{property attributes 'nonnull' … 105 @property(nonatomic, weak, nonnull, readonly) id ROdelegate; // expected-error {{property attribute…
|
/external/llvm/test/Transforms/FunctionAttrs/ |
D | nonnull.ll | 2 declare nonnull i8* @ret_nonnull() 4 ; Return a pointer trivially nonnull (call return attribute) 6 ; CHECK: define nonnull i8* @test1 11 ; Return a pointer trivially nonnull (argument attribute) 12 define i8* @test2(i8* nonnull %p) { 13 ; CHECK: define nonnull i8* @test2 17 ; Given an SCC where one of the functions can not be marked nonnull, 18 ; can we still mark the other one which is trivially nonnull 26 ; CHECK: define nonnull i8* @test3 33 ; nonnull if neither can ever return null. (In this case, they [all …]
|
/external/clang/test/CodeGenObjC/ |
D | exceptions.m | 58 // CHECK-NEXT: call void asm sideeffect "", "*m,*m"(i32* nonnull [[X]] 65 // CHECK: call void asm sideeffect "", "=*m,=*m"(i32* nonnull [[X]] 96 // CHECK: call void @f3_helper(i32 0, i32* nonnull [[X]]) 104 // CHECK: call void @f3_helper(i32 1, i32* nonnull [[X]]) 109 // CHECK: call void @f3_helper(i32 2, i32* nonnull [[X]]) 126 // CHECK: call void @f3_helper(i32 4, i32* nonnull [[X]]) 127 // CHECK-NEXT: call void @llvm.lifetime.end(i64 4, i8* nonnull [[XPTR]]) 138 // CHECK: call void @objc_exception_try_enter([[EXNDATA_T]]* nonnull [[EXNDATA]]) 147 // CHECK: call i8* @objc_exception_extract([[EXNDATA_T]]* nonnull [[EXNDATA]]) 157 // CHECK-NEXT: call void @objc_exception_try_exit([[EXNDATA_T]]* nonnull [[EXNDATA]]) [all …]
|
/external/clang/test/CodeGenObjCXX/ |
D | exceptions-legacy.mm | 18 // CHECK: call void @objc_exception_try_enter([[BUF_T:%.*]]* nonnull [[BUF:%.*]]) 28 // CHECK: call void @objc_exception_try_exit([[BUF_T]]* nonnull [[BUF]]) 36 // CHECK-NEXT: call void @objc_exception_try_exit([[BUF_T]]* nonnull [[BUF]]) 44 // CHECK-NEXT: [[T0:%.*]] = call i8* @objc_exception_extract([[BUF_T]]* nonnull [[BUF]]) 57 // CHECK: call void @objc_exception_try_enter([[BUF_T]]* nonnull [[BUF:%.*]]) 67 // CHECK: call void @objc_exception_try_exit([[BUF_T]]* nonnull [[BUF]]) 74 // CHECK-NEXT: call void @objc_exception_try_exit([[BUF_T]]* nonnull [[BUF]])
|
/external/clang/docs/analyzer/ |
D | nullability.rst | 15 …'p' gets implicitly converted into nonnull pointer, for example, we are passing it to a function t… 29 2) nonnull 32 - Dereferencing a nonnull, or sending message to it is ok. 33 - Converting nonnull to nullable is Ok. 34 - When there is an explicit cast from nonnull to nullable I will trust the cast (it is probable the… 54 …- Even though the method might return a nonnull pointer, when it was sent to a nullable pointer th… 56 - Sending a message to a unspecified or nonnull pointer 63 …tly inside an inlined body. For example, consider these conversions from nonnull to nullable in pr… 73 …t view of the nullability of the same symbol). So the symbol will remain nonnull to avoid false po… 88 …gion a qualifier information would be attached which is either nullable, nonnull or null unspecifi… [all …]
|
/external/llvm/test/CodeGen/X86/ |
D | cxx_tlscc64.ll | 59 define cxx_fast_tlscc nonnull %struct.S* @_ZTW2sg() { 65 tail call void @_ZN1SC1Ev(%struct.S* nonnull @sg) #2 66 …nonnull bitcast (void (%struct.S*)* @_ZN1SD1Ev to void (i8*)*), i8* nonnull getelementptr inbounds…
|
/external/llvm/test/CodeGen/AArch64/ |
D | cxx-tlscc.ll | 16 define cxx_fast_tlscc nonnull %struct.S* @_ZTW2sg() nounwind { 22 %call.i.i = tail call %struct.S* @_ZN1SC1Ev(%struct.S* nonnull @sg) 23 …nonnull bitcast (%struct.S* (%struct.S*)* @_ZN1SD1Ev to void (i8*)*), i8* nonnull getelementptr in…
|
/external/clang/test/Parser/ |
D | attributes.c | 67 int testFundef1(int *a) __attribute__((nonnull(1))) { // \ 78 int testFundef3(int *a) __attribute__((nonnull(1), // \ 85 int testFundef4(int *a) __attribute__((nonnull(1))) // \
|
/external/clang/test/Misc/ |
D | attr-source-range.cpp | 12 void i(int j) __attribute__((nonnull(1))); 15 void j(__attribute__((nonnull)) int i);
|
/external/clang/test/SemaObjCXX/Inputs/ |
D | nullability-consistency-2.h | 12 @property (retain,nonnull) id property1; 15 - (void)method2:(nonnull SomeClass *)param;
|
/external/llvm/test/Transforms/InstCombine/ |
D | call_nonnull_arg.ll | 3 ; InstCombine should mark null-checked argument as nonnull at callsite 8 ; CHECK: call void @dummy(i32* nonnull %a, i32 %b)
|
D | fold-phi-load-metadata.ll | 11 ; CHECK: load i32*, i32** %{{[a-z0-9.]+}}, align 8, !nonnull ![[EMPTYNODE:[0-9]+]] 23 %p0 = load i32*, i32** %x0, align 8, !nonnull !17 29 %p1 = load i32*, i32** %x1, align 8, !nonnull !17
|