Files
TheRock/compiler/amd-llvm/clang/test/SemaObjC/property-category-4.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

122 lines
2.6 KiB
Objective-C

// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
@interface IDELogNavigator
{
id selectedObjects;
}
@end
@interface IDELogNavigator (CAT)
@property (readwrite, retain) id selectedObjects; // expected-note {{property declared here}}
@property (readwrite, retain) id d_selectedObjects; // expected-note {{property declared here}}
@end
@implementation IDELogNavigator
@synthesize selectedObjects = _selectedObjects; // expected-error {{property declared in category 'CAT' cannot be implemented in class implementation}}
@dynamic d_selectedObjects; // expected-error {{property declared in category 'CAT' cannot be implemented in class implementation}}
@end
// Test1
@interface NSArray
- (int)count;
@end
@protocol MyCountable
@property (readonly) int count;
@end
@interface NSArray(Additions) <MyCountable>
@end
@implementation NSArray(Additions)
@end
// Test2
@protocol NSProtocol
- (int)count;
@end
@interface NSArray1 <NSProtocol>
@end
@interface NSArray1(Additions) <MyCountable>
@end
@implementation NSArray1(Additions)
@end
// Test3
@interface Super <NSProtocol>
@end
@interface NSArray2 : Super @end
@interface NSArray2(Additions) <MyCountable>
@end
@implementation NSArray2(Additions)
@end
// Test3
@interface Super1 <NSProtocol>
@property (readonly) int count;
@end
@protocol MyCountable1
@end
@interface NSArray3 : Super1 <MyCountable1>
@end
@implementation NSArray3
@end
// Test4
@interface I
@property int d1;
@end
@interface I(CAT)
@property int d1;
@end
@implementation I(CAT)
@end
// Test5
@interface C @end
@interface C (CAT)
- (int) p;
@end
@interface C (Category)
@property (readonly) int p; // no warning for this property - a getter is declared in another category
@property (readonly) int p1; // expected-note {{property declared here}}
@property (readonly) int p2; // no warning for this property - a getter is declared in this category
- (int) p2;
@end
@implementation C (Category) // expected-warning {{property 'p1' requires method 'p1' to be defined - use @dynamic or provide a method implementation in this category}}
@end
// Test6
@protocol MyProtocol
@property (readonly) float anotherFloat; // expected-note {{property declared here}}
@property (readonly) float Float; // no warning for this property - a getter is declared in this protocol
- (float) Float;
@end
@interface MyObject
{ float anotherFloat; }
@end
@interface MyObject (CAT) <MyProtocol>
@end
@implementation MyObject (CAT) // expected-warning {{property 'anotherFloat' requires method 'anotherFloat' to be defined - use @dynamic or provide a method implementation in this category}}
@end