[InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X,...
[llvm-project.git] / clang / test / SemaObjC / class-getter-using-dotsyntax.m
blobdd384b5108336aafd4be35e648e5dffa4ac21e25
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2 // expected-no-diagnostics
4 typedef struct objc_class *Class;
6 struct objc_class {
7     Class isa;
8 };
10 typedef struct objc_object {
11     Class isa;
12 } *id;
14 @interface XCActivityLogSection 
15 + (unsigned)serializationFormatVersion;
16 + (unsigned)sectionByDeserializingData;
17 + (Class)retursClass;
18 @end
20 @implementation XCActivityLogSection
22 + (unsigned)serializationFormatVersion
25     return 0;
27 + (unsigned)sectionByDeserializingData {
28     unsigned version;
29     return self.serializationFormatVersion;
32 + (Class)retursClass {
33     Class version;
34     // FIXIT. (*version).isa does not work. Results in compiler error.
35     return version->isa;
38 @end