brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 35cfe05 Raw
39 lines · plain
1// RUN: rm -rf %t && mkdir -p %t2// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fapinotes-modules  -fdisable-module-hash -fsyntax-only -F %S/Inputs/Frameworks %s3// RUN: %clang_cc1 -ast-print %t/ModulesCache/SimpleKit.pcm | FileCheck %s4// RUN: %clang_cc1 -ast-dump -ast-dump-filter 'DUMP' %t/ModulesCache/SimpleKit.pcm | FileCheck -check-prefix CHECK-DUMP %s5 6#import <SimpleKit/SimpleKit.h>7 8// CHECK: __attribute__((cf_returns_not_retained)) void *getCFOwnedToUnowned(void);9// CHECK: __attribute__((cf_returns_retained)) void *getCFUnownedToOwned(void);10// CHECK: __attribute__((cf_unknown_transfer)) void *getCFOwnedToNone(void);11// CHECK: __attribute__((ns_returns_not_retained)) id getObjCOwnedToUnowned(void);12// CHECK: __attribute__((ns_returns_retained)) id getObjCUnownedToOwned(void);13// CHECK: int indirectGetCFOwnedToUnowned(__attribute__((cf_returns_not_retained)) void * _Nullable *out);14// CHECK: int indirectGetCFUnownedToOwned(__attribute__((cf_returns_retained)) void * _Nullable *out);15// CHECK: int indirectGetCFOwnedToNone(void * _Nullable *out);16// CHECK: int indirectGetCFNoneToOwned(__attribute__((cf_returns_not_retained)) void **out);17 18// CHECK-LABEL: @interface MethodTest19// CHECK: - (id)getOwnedToUnowned __attribute__((ns_returns_not_retained));20// CHECK: - (id)getUnownedToOwned __attribute__((ns_returns_retained));21// CHECK: @end22 23// CHECK-DUMP-LABEL: Dumping getCFAuditedToUnowned_DUMP:24// CHECK-DUMP-NEXT: FunctionDecl25// CHECK-DUMP-NEXT: CFReturnsNotRetainedAttr26// CHECK-DUMP-NEXT: CFAuditedTransferAttr27// CHECK-DUMP-NOT: Attr28 29// CHECK-DUMP-LABEL: Dumping getCFAuditedToOwned_DUMP:30// CHECK-DUMP-NEXT: FunctionDecl31// CHECK-DUMP-NEXT: CFReturnsRetainedAttr32// CHECK-DUMP-NEXT: CFAuditedTransferAttr33// CHECK-DUMP-NOT: Attr34 35// CHECK-DUMP-LABEL: Dumping getCFAuditedToNone_DUMP:36// CHECK-DUMP-NEXT: FunctionDecl37// CHECK-DUMP-NEXT: CFUnknownTransferAttr38// CHECK-DUMP-NOT: Attr39