1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s 2*f4a2713aSLionel Sambuc// expected-no-diagnostics 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuctypedef struct objc_class *Class; 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambucstruct objc_class { 7*f4a2713aSLionel Sambuc Class isa; 8*f4a2713aSLionel Sambuc}; 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuctypedef struct objc_object { 11*f4a2713aSLionel Sambuc Class isa; 12*f4a2713aSLionel Sambuc} *id; 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc@interface XCActivityLogSection 15*f4a2713aSLionel Sambuc+ (unsigned)serializationFormatVersion; 16*f4a2713aSLionel Sambuc+ (unsigned)sectionByDeserializingData; 17*f4a2713aSLionel Sambuc+ (Class)retursClass; 18*f4a2713aSLionel Sambuc@end 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc@implementation XCActivityLogSection 21*f4a2713aSLionel Sambuc 22*f4a2713aSLionel Sambuc+ (unsigned)serializationFormatVersion 23*f4a2713aSLionel Sambuc{ 24*f4a2713aSLionel Sambuc 25*f4a2713aSLionel Sambuc return 0; 26*f4a2713aSLionel Sambuc} 27*f4a2713aSLionel Sambuc+ (unsigned)sectionByDeserializingData { 28*f4a2713aSLionel Sambuc unsigned version; 29*f4a2713aSLionel Sambuc return self.serializationFormatVersion; 30*f4a2713aSLionel Sambuc} 31*f4a2713aSLionel Sambuc 32*f4a2713aSLionel Sambuc+ (Class)retursClass { 33*f4a2713aSLionel Sambuc Class version; 34*f4a2713aSLionel Sambuc // FIXIT. (*version).isa does not work. Results in compiler error. 35*f4a2713aSLionel Sambuc return version->isa; 36*f4a2713aSLionel Sambuc} 37*f4a2713aSLionel Sambuc 38*f4a2713aSLionel Sambuc@end 39*f4a2713aSLionel Sambuc 40*f4a2713aSLionel Sambuc 41