[cfe-dev] clang::ObjCInterfaceTypeLoc

Vladimir Voskresensky via cfe-dev cfe-dev at lists.llvm.org
Sun Feb 12 16:34:08 PST 2017


Hello Clang experts,

Could you help me, please, to understand how does ObjCInterfaceTypeLoc 
class suppose to work?
ObjCInterfaceTypeLoc is the only one class in TypeLoc hierarchy which 
inherits twice from ConcreteTypeLoc.
I see in source code and visually at
http://ftp.llvm.org/doxygen/classclang_1_1ObjCInterfaceTypeLoc.html

It is derived from ObjCObjectTypeLoc (which uses ObjCObjectTypeLocInfo),
but has own ObjCInterfaceLocInfo (passed as LocalData).
Does it replace the ObjCObjectTypeLocInfo used by ObjCObjectTypeLoc?
ObjCInterfaceLocInfo is not derived from ObjCObjectTypeLocInfo, so 
sizeof(ObjCInterfaceLocInfo) < sizeof(ObjCObjectTypeLocInfo)
How methods of ObjCObjectTypeLoc can work for ObjCInterfaceTypeLoc instance?
Shouldn't it be more like:
http://clang.llvm.org/doxygen/classclang_1_1TypeofLikeTypeLoc.html


Thanks!
Vladimir.



More information about the cfe-dev mailing list