[DAG] TransformFPLoadStorePair - early out if we're not loading a simple type
[llvm-project.git] / clang / test / APINotes / retain-count-convention.m
blob35cfe0581daf59c0e7888023bc89baf6dff2e03a
1 // RUN: rm -rf %t && mkdir -p %t
2 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fapinotes-modules  -fdisable-module-hash -fsyntax-only -F %S/Inputs/Frameworks %s
3 // RUN: %clang_cc1 -ast-print %t/ModulesCache/SimpleKit.pcm | FileCheck %s
4 // RUN: %clang_cc1 -ast-dump -ast-dump-filter 'DUMP' %t/ModulesCache/SimpleKit.pcm | FileCheck -check-prefix CHECK-DUMP %s
6 #import <SimpleKit/SimpleKit.h>
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);
18 // CHECK-LABEL: @interface MethodTest
19 // CHECK: - (id)getOwnedToUnowned __attribute__((ns_returns_not_retained));
20 // CHECK: - (id)getUnownedToOwned __attribute__((ns_returns_retained));
21 // CHECK: @end
23 // CHECK-DUMP-LABEL: Dumping getCFAuditedToUnowned_DUMP:
24 // CHECK-DUMP-NEXT: FunctionDecl
25 // CHECK-DUMP-NEXT: CFReturnsNotRetainedAttr
26 // CHECK-DUMP-NEXT: CFAuditedTransferAttr
27 // CHECK-DUMP-NOT: Attr
29 // CHECK-DUMP-LABEL: Dumping getCFAuditedToOwned_DUMP:
30 // CHECK-DUMP-NEXT: FunctionDecl
31 // CHECK-DUMP-NEXT: CFReturnsRetainedAttr
32 // CHECK-DUMP-NEXT: CFAuditedTransferAttr
33 // CHECK-DUMP-NOT: Attr
35 // CHECK-DUMP-LABEL: Dumping getCFAuditedToNone_DUMP:
36 // CHECK-DUMP-NEXT: FunctionDecl
37 // CHECK-DUMP-NEXT: CFUnknownTransferAttr
38 // CHECK-DUMP-NOT: Attr