Mercurial > hg > CbC > CbC_llvm
diff clang/test/SemaObjC/class-getter-using-dotsyntax.m @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clang/test/SemaObjC/class-getter-using-dotsyntax.m Thu Feb 13 15:10:13 2020 +0900 @@ -0,0 +1,40 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s +// expected-no-diagnostics + +typedef struct objc_class *Class; + +struct objc_class { + Class isa; +}; + +typedef struct objc_object { + Class isa; +} *id; + +@interface XCActivityLogSection ++ (unsigned)serializationFormatVersion; ++ (unsigned)sectionByDeserializingData; ++ (Class)retursClass; +@end + +@implementation XCActivityLogSection + ++ (unsigned)serializationFormatVersion +{ + + return 0; +} ++ (unsigned)sectionByDeserializingData { + unsigned version; + return self.serializationFormatVersion; +} + ++ (Class)retursClass { + Class version; + // FIXIT. (*version).isa does not work. Results in compiler error. + return version->isa; +} + +@end + +