Files
TheRock/compiler/amd-llvm/clang/test/AST/ast-dump-attr.m
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

69 lines
2.4 KiB
Objective-C

// Test without serialization:
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10.0 \
// RUN: -ast-dump -ast-dump-filter Test %s \
// RUN: | FileCheck --strict-whitespace %s
//
// Test with serialization:
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10.0 \
// RUN: -emit-pch -o %t %s
// RUN: %clang_cc1 -x objective-c -triple x86_64-apple-macosx10.10.0 \
// RUN: -include-pch %t -ast-dump-all -ast-dump-filter Test /dev/null \
// RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
// RUN: | FileCheck --strict-whitespace %s
@interface NSObject
@end
[[clang::objc_exception]]
@interface Test1 {
// CHECK: ObjCInterfaceDecl{{.*}} Test1
// CHECK-NEXT: ObjCExceptionAttr{{.*}}
[[clang::iboutlet]] NSObject *Test2;
// CHECK: ObjCIvarDecl{{.*}} Test2
// CHECK-NEXT: IBOutletAttr
}
@property (readonly) [[clang::objc_returns_inner_pointer]] void *Test3, *Test4;
// CHECK: ObjCPropertyDecl{{.*}} Test3 'void *' readonly
// CHECK-NEXT: ObjCReturnsInnerPointerAttr
// CHECK-NEXT: ObjCPropertyDecl{{.*}} Test4 'void *' readonly
// CHECK-NEXT: ObjCReturnsInnerPointerAttr
@property (readonly) [[clang::iboutlet]] NSObject *Test5;
// CHECK: ObjCPropertyDecl{{.*}} Test5 'NSObject *' readonly
// CHECK-NEXT: IBOutletAttr
// CHECK: ObjCMethodDecl{{.*}} implicit{{.*}} Test3
// CHECK-NEXT: ObjCReturnsInnerPointerAttr
// CHECK: ObjCMethodDecl{{.*}} implicit{{.*}} Test4
// CHECK-NEXT: ObjCReturnsInnerPointerAttr
// CHECK: ObjCMethodDecl{{.*}} implicit{{.*}} Test5
// CHECK-NOT: IBOutletAttr
@end
[[clang::objc_runtime_name("name")]] @protocol Test6;
// CHECK: ObjCProtocolDecl{{.*}} Test6
// CHECK-NEXT: ObjCRuntimeNameAttr{{.*}} "name"
[[clang::objc_protocol_requires_explicit_implementation]]
@protocol Test7
// CHECK: ObjCProtocolDecl{{.*}} Test7
// CHECK-NEXT: ObjCExplicitProtocolImplAttr
@end
@interface Test8
// CHECK: ObjCInterfaceDecl{{.*}} Test8
-(void)Test9 [[clang::ns_consumes_self]];
// CHECK: ObjCMethodDecl{{.*}} Test9 'void'
// CHECK-NEXT: NSConsumesSelfAttr
-(void) [[clang::ns_consumes_self]] Test10: (int)Test11;
// CHECK: ObjCMethodDecl{{.*}} Test10: 'void'
// CHECK-NEXT: |-ParmVarDecl{{.*}} Test11 'int'
// CHECK-NEXT: `-NSConsumesSelfAttr
-(void)Test12: (int *) [[clang::noescape]] Test13 to:(int)Test14 [[clang::ns_consumes_self]];
// CHECK: ObjCMethodDecl{{.*}} Test12:to: 'void'
// CHECK-NEXT: |-ParmVarDecl{{.*}} Test13 'int *'
// CHECK-NEXT: | `-NoEscapeAttr
// CHECK-NEXT: |-ParmVarDecl{{.*}} Test14 'int'
// CHECK-NEXT: `-NSConsumesSelfAttr
@end