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
71 lines
2.4 KiB
Objective-C
71 lines
2.4 KiB
Objective-C
// RUN: %clang_cc1 -triple x86_64-apple-macosx11.0.0 -fobjc-runtime=macosx-11.0.0 -fobjc-constant-literals -fconstant-nsnumber-literals -fconstant-nsarray-literals -fconstant-nsdictionary-literals -emit-pch -o %t %s
|
|
// RUN: %clang_cc1 -triple x86_64-apple-macosx11.0.0 -fobjc-runtime=macosx-11.0.0 -fobjc-constant-literals -fconstant-nsnumber-literals -fconstant-nsarray-literals -fconstant-nsdictionary-literals -include-pch %t -verify %s
|
|
|
|
// expected-no-diagnostics
|
|
|
|
#if __has_feature(objc_constant_literals)
|
|
|
|
#ifndef HEADER
|
|
#define HEADER
|
|
|
|
typedef unsigned char BOOL;
|
|
|
|
@interface NSNumber
|
|
@end
|
|
|
|
@interface NSNumber (NSNumberCreation)
|
|
+ (NSNumber *)numberWithChar:(char)value;
|
|
+ (NSNumber *)numberWithUnsignedChar:(unsigned char)value;
|
|
+ (NSNumber *)numberWithShort:(short)value;
|
|
+ (NSNumber *)numberWithUnsignedShort:(unsigned short)value;
|
|
+ (NSNumber *)numberWithInt:(int)value;
|
|
+ (NSNumber *)numberWithUnsignedInt:(unsigned int)value;
|
|
+ (NSNumber *)numberWithLong:(long)value;
|
|
+ (NSNumber *)numberWithUnsignedLong:(unsigned long)value;
|
|
+ (NSNumber *)numberWithLongLong:(long long)value;
|
|
+ (NSNumber *)numberWithUnsignedLongLong:(unsigned long long)value;
|
|
+ (NSNumber *)numberWithFloat:(float)value;
|
|
+ (NSNumber *)numberWithDouble:(double)value;
|
|
+ (NSNumber *)numberWithBool:(BOOL)value;
|
|
@end
|
|
|
|
@interface NSArray
|
|
@end
|
|
|
|
@interface NSArray (NSArrayCreation)
|
|
+ (id)arrayWithObjects:(const id[])objects count:(unsigned long)cnt;
|
|
@end
|
|
|
|
@interface NSDictionary
|
|
+ (id)dictionaryWithObjects:(const id[])objects forKeys:(const id[])keys count:(unsigned long)cnt;
|
|
@end
|
|
|
|
static NSNumber *const intlit = @17;
|
|
static NSNumber *const floatlit = @17.45f;
|
|
static NSNumber *const doublelit = @17.45;
|
|
|
|
static NSDictionary *const dictlit = @{@"hello" : @17,
|
|
@"world" : @17.45};
|
|
static NSDictionary *const dictlitIdentical = @{@"hello" : @17,
|
|
@"world" : @17.45};
|
|
|
|
static NSArray *const arraylit = @[ @17, @17.45, @17.45f ];
|
|
static NSArray *const arraylitIdentical = @[ @17, @17.45, @17.45f ];
|
|
static NSArray *const arrayWithDictKeys = @[ @"hello", @"world" ];
|
|
|
|
#else
|
|
void test_all() {
|
|
NSNumber *a = intlit;
|
|
NSNumber *b = floatlit;
|
|
NSNumber *c = doublelit;
|
|
NSDictionary *d = dictlit;
|
|
NSDictionary *e = dictlitIdentical;
|
|
NSArray *f = arraylit;
|
|
NSArray *g = arraylitIdentical;
|
|
NSArray *h = arrayWithDictKeys;
|
|
}
|
|
#endif /* ! HEADER */
|
|
|
|
#else
|
|
#error
|
|
#endif /* ! __has_feature(objc_constant_literals) */ |