33using System ;
44using System . Diagnostics ;
55using System . Runtime . InteropServices ;
6+ using static ClangSharp . Interop . CXTypeKind ;
7+ using static ClangSharp . Interop . CX_TypeClass ;
68
79namespace ClangSharp . Interop ;
810
911[ DebuggerDisplay ( "{DebuggerDisplayString,nq}" ) ]
1012public unsafe partial struct CXType : IEquatable < CXType >
1113{
12- public uint AddressSpace => ( kind != CXTypeKind . CXType_Invalid ) ? clang . getAddressSpace ( this ) : default ;
14+ public uint AddressSpace => ( kind != CXType_Invalid ) ? clang . getAddressSpace ( this ) : default ;
1315
1416 public CXCursor AddrSpaceExpr => clangsharp . Type_getAddrSpaceExpr ( this ) ;
1517
16- public CXType AdjustedType => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getAdjustedType ( this ) : default ;
18+ public CXType AdjustedType => ( kind != CXType_Invalid ) ? clangsharp . Type_getAdjustedType ( this ) : default ;
1719
1820 public long AlignOf => clang . Type_getAlignOf ( this ) ;
1921
@@ -35,27 +37,27 @@ public unsafe partial struct CXType : IEquatable<CXType>
3537
3638 public CXType DecayedType => clangsharp . Type_getDecayedType ( this ) ;
3739
38- public CXCursor Declaration => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getDeclaration ( this ) : default ;
40+ public CXCursor Declaration => ( kind != CXType_Invalid ) ? clangsharp . Type_getDeclaration ( this ) : default ;
3941
40- public CXType DeducedType => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getDeducedType ( this ) : default ;
42+ public CXType DeducedType => ( kind != CXType_Invalid ) ? clangsharp . Type_getDeducedType ( this ) : default ;
4143
4244 public int Depth => clangsharp . Type_getDepth ( this ) ;
4345
44- public CXType Desugar => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_desugar ( this ) : default ;
46+ public CXType Desugar => ( kind != CXType_Invalid ) ? clangsharp . Type_desugar ( this ) : default ;
4547
46- public CXType ElementType => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getElementType ( this ) : default ;
48+ public CXType ElementType => ( kind != CXType_Invalid ) ? clangsharp . Type_getElementType ( this ) : default ;
4749
48- public CXType EquivalentType => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getEquivalentType ( this ) : default ;
50+ public CXType EquivalentType => ( kind != CXType_Invalid ) ? clangsharp . Type_getEquivalentType ( this ) : default ;
4951
5052 public CXCursor_ExceptionSpecificationKind ExceptionSpecificationType => ( CXCursor_ExceptionSpecificationKind ) clang . getExceptionSpecificationType ( this ) ;
5153
5254 public CXCallingConv FunctionTypeCallingConv => clang . getFunctionTypeCallingConv ( this ) ;
5355
5456 public int Index => clangsharp . Type_getIndex ( this ) ;
5557
56- public CXType InjectedSpecializationType => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getInjectedSpecializationType ( this ) : default ;
58+ public CXType InjectedSpecializationType => ( kind != CXType_Invalid ) ? clangsharp . Type_getInjectedSpecializationType ( this ) : default ;
5759
58- public CXType InjectedTST => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getInjectedTST ( this ) : default ;
60+ public CXType InjectedTST => ( kind != CXType_Invalid ) ? clangsharp . Type_getInjectedTST ( this ) : default ;
5961
6062 public bool IsCanonical => Equals ( CanonicalType ) ;
6163
@@ -69,7 +71,7 @@ public unsafe partial struct CXType : IEquatable<CXType>
6971
7072 public bool IsSigned => clangsharp . Type_getIsSigned ( this ) != 0 ;
7173
72- public bool IsSugared => ( kind != CXTypeKind . CXType_Invalid ) && clangsharp . Type_getIsSugared ( this ) != 0 ;
74+ public bool IsSugared => ( kind != CXType_Invalid ) && clangsharp . Type_getIsSugared ( this ) != 0 ;
7375
7476 public bool IsTransparentTagTypedef => clang . Type_isTransparentTagTypedef ( this ) != 0 ;
7577
@@ -109,21 +111,21 @@ public unsafe partial struct CXType : IEquatable<CXType>
109111
110112 public CXType ObjCObjectBaseType => clang . Type_getObjCObjectBaseType ( this ) ;
111113
112- public CXType OriginalType => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getOriginalType ( this ) : default ;
114+ public CXType OriginalType => ( kind != CXType_Invalid ) ? clangsharp . Type_getOriginalType ( this ) : default ;
113115
114- public CXCursor OwnedTagDecl => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getOwnedTagDecl ( this ) : default ;
116+ public CXCursor OwnedTagDecl => ( kind != CXType_Invalid ) ? clangsharp . Type_getOwnedTagDecl ( this ) : default ;
115117
116- public CXType PointeeType => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getPointeeType ( this ) : default ;
118+ public CXType PointeeType => ( kind != CXType_Invalid ) ? clangsharp . Type_getPointeeType ( this ) : default ;
117119
118120 public CXType ResultType => clang . getResultType ( this ) ;
119121
120- public CXCursor RowExpr => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getRowExpr ( this ) : default ;
122+ public CXCursor RowExpr => ( kind != CXType_Invalid ) ? clangsharp . Type_getRowExpr ( this ) : default ;
121123
122- public CXCursor SizeExpr => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getSizeExpr ( this ) : default ;
124+ public CXCursor SizeExpr => ( kind != CXType_Invalid ) ? clangsharp . Type_getSizeExpr ( this ) : default ;
123125
124126 public long SizeOf => clang . Type_getSizeOf ( this ) ;
125127
126- public CXString Spelling => ( kind != CXTypeKind . CXType_Invalid ) ? clang . getTypeSpelling ( this ) : default ;
128+ public CXString Spelling => ( kind != CXType_Invalid ) ? clang . getTypeSpelling ( this ) : default ;
127129
128130 public CX_TemplateName TemplateName
129131 {
@@ -141,76 +143,76 @@ public string TypeClassSpelling
141143 {
142144 get
143145 {
144- Debug . Assert ( CX_TypeClass . CX_TypeClass_TypeLast == CX_TypeClass . CX_TypeClass_ExtVector ) ;
145- Debug . Assert ( CX_TypeClass . CX_TypeClass_TagFirst == CX_TypeClass . CX_TypeClass_Record ) ;
146- Debug . Assert ( CX_TypeClass . CX_TypeClass_TagLast == CX_TypeClass . CX_TypeClass_Enum ) ;
146+ Debug . Assert ( CX_TypeClass_TypeLast == CX_TypeClass_ExtVector ) ;
147+ Debug . Assert ( CX_TypeClass_TagFirst == CX_TypeClass_Record ) ;
148+ Debug . Assert ( CX_TypeClass_TagLast == CX_TypeClass_Enum ) ;
147149
148150 return TypeClass switch {
149- CX_TypeClass . CX_TypeClass_Invalid => "Invalid" ,
150- CX_TypeClass . CX_TypeClass_Adjusted => "Adjusted" ,
151- CX_TypeClass . CX_TypeClass_Decayed => "Decayed" ,
152- CX_TypeClass . CX_TypeClass_ConstantArray => "ConstantArray" ,
153- CX_TypeClass . CX_TypeClass_DependentSizedArray => "DependentSizedArray" ,
154- CX_TypeClass . CX_TypeClass_IncompleteArray => "IncompleteArray" ,
155- CX_TypeClass . CX_TypeClass_VariableArray => "VariableArray" ,
156- CX_TypeClass . CX_TypeClass_Atomic => "Atomic" ,
157- CX_TypeClass . CX_TypeClass_Attributed => "Attributed" ,
158- CX_TypeClass . CX_TypeClass_BTFTagAttributed => "BTFTagAttributed" ,
159- CX_TypeClass . CX_TypeClass_BitInt => "BitInt" ,
160- CX_TypeClass . CX_TypeClass_BlockPointer => "BlockPointer" ,
161- CX_TypeClass . CX_TypeClass_Builtin => "Builtin" ,
162- CX_TypeClass . CX_TypeClass_Complex => "Complex" ,
163- CX_TypeClass . CX_TypeClass_Decltype => "Decltype" ,
164- CX_TypeClass . CX_TypeClass_Auto => "Auto" ,
165- CX_TypeClass . CX_TypeClass_DeducedTemplateSpecialization => "DeducedTemplateSpecialization" ,
166- CX_TypeClass . CX_TypeClass_DependentAddressSpace => "DependentAddressSpace" ,
167- CX_TypeClass . CX_TypeClass_DependentBitInt => "DependentBitInt" ,
168- CX_TypeClass . CX_TypeClass_DependentName => "DependentName" ,
169- CX_TypeClass . CX_TypeClass_DependentSizedExtVector => "DependentSizedExtVector" ,
170- CX_TypeClass . CX_TypeClass_DependentTemplateSpecialization => "DependentTemplateSpecialization" ,
171- CX_TypeClass . CX_TypeClass_DependentVector => "DependentVector" ,
172- CX_TypeClass . CX_TypeClass_Elaborated => "Elaborated" ,
173- CX_TypeClass . CX_TypeClass_FunctionNoProto => "FunctionNoProto" ,
174- CX_TypeClass . CX_TypeClass_FunctionProto => "FunctionProto" ,
175- CX_TypeClass . CX_TypeClass_InjectedClassName => "InjectedClassName" ,
176- CX_TypeClass . CX_TypeClass_MacroQualified => "MacroQualified" ,
177- CX_TypeClass . CX_TypeClass_ConstantMatrix => "ConstantMatrix" ,
178- CX_TypeClass . CX_TypeClass_DependentSizedMatrix => "DependentSizedMatrix" ,
179- CX_TypeClass . CX_TypeClass_MemberPointer => "MemberPointer" ,
180- CX_TypeClass . CX_TypeClass_ObjCObjectPointer => "ObjCObjectPointer" ,
181- CX_TypeClass . CX_TypeClass_ObjCObject => "ObjCObject" ,
182- CX_TypeClass . CX_TypeClass_ObjCInterface => "ObjCInterface" ,
183- CX_TypeClass . CX_TypeClass_ObjCTypeParam => "ObjCTypeParam" ,
184- CX_TypeClass . CX_TypeClass_PackExpansion => "PackExpansion" ,
185- CX_TypeClass . CX_TypeClass_Paren => "Paren" ,
186- CX_TypeClass . CX_TypeClass_Pipe => "Pipe" ,
187- CX_TypeClass . CX_TypeClass_Pointer => "Pointer" ,
188- CX_TypeClass . CX_TypeClass_LValueReference => "LValueReference" ,
189- CX_TypeClass . CX_TypeClass_RValueReference => "RValueReference" ,
190- CX_TypeClass . CX_TypeClass_SubstTemplateTypeParmPack => "SubstTemplateTypeParmPack" ,
191- CX_TypeClass . CX_TypeClass_SubstTemplateTypeParm => "SubstTemplateTypeParm" ,
192- CX_TypeClass . CX_TypeClass_Enum => "Enum" ,
193- CX_TypeClass . CX_TypeClass_Record => "Record" ,
194- CX_TypeClass . CX_TypeClass_TemplateSpecialization => "TemplateSpecialization" ,
195- CX_TypeClass . CX_TypeClass_TemplateTypeParm => "TemplateTypeParm" ,
196- CX_TypeClass . CX_TypeClass_TypeOfExpr => "TypeOfExpr" ,
197- CX_TypeClass . CX_TypeClass_TypeOf => "TypeOf" ,
198- CX_TypeClass . CX_TypeClass_Typedef => "Typedef" ,
199- CX_TypeClass . CX_TypeClass_UnaryTransform => "UnaryTransform" ,
200- CX_TypeClass . CX_TypeClass_UnresolvedUsing => "UnresolvedUsing" ,
201- CX_TypeClass . CX_TypeClass_Using => "Using" ,
202- CX_TypeClass . CX_TypeClass_Vector => "Vector" ,
203- CX_TypeClass . CX_TypeClass_ExtVector => "ExtVector" ,
151+ CX_TypeClass_Invalid => "Invalid" ,
152+ CX_TypeClass_Adjusted => "Adjusted" ,
153+ CX_TypeClass_Decayed => "Decayed" ,
154+ CX_TypeClass_ConstantArray => "ConstantArray" ,
155+ CX_TypeClass_DependentSizedArray => "DependentSizedArray" ,
156+ CX_TypeClass_IncompleteArray => "IncompleteArray" ,
157+ CX_TypeClass_VariableArray => "VariableArray" ,
158+ CX_TypeClass_Atomic => "Atomic" ,
159+ CX_TypeClass_Attributed => "Attributed" ,
160+ CX_TypeClass_BTFTagAttributed => "BTFTagAttributed" ,
161+ CX_TypeClass_BitInt => "BitInt" ,
162+ CX_TypeClass_BlockPointer => "BlockPointer" ,
163+ CX_TypeClass_Builtin => "Builtin" ,
164+ CX_TypeClass_Complex => "Complex" ,
165+ CX_TypeClass_Decltype => "Decltype" ,
166+ CX_TypeClass_Auto => "Auto" ,
167+ CX_TypeClass_DeducedTemplateSpecialization => "DeducedTemplateSpecialization" ,
168+ CX_TypeClass_DependentAddressSpace => "DependentAddressSpace" ,
169+ CX_TypeClass_DependentBitInt => "DependentBitInt" ,
170+ CX_TypeClass_DependentName => "DependentName" ,
171+ CX_TypeClass_DependentSizedExtVector => "DependentSizedExtVector" ,
172+ CX_TypeClass_DependentTemplateSpecialization => "DependentTemplateSpecialization" ,
173+ CX_TypeClass_DependentVector => "DependentVector" ,
174+ CX_TypeClass_Elaborated => "Elaborated" ,
175+ CX_TypeClass_FunctionNoProto => "FunctionNoProto" ,
176+ CX_TypeClass_FunctionProto => "FunctionProto" ,
177+ CX_TypeClass_InjectedClassName => "InjectedClassName" ,
178+ CX_TypeClass_MacroQualified => "MacroQualified" ,
179+ CX_TypeClass_ConstantMatrix => "ConstantMatrix" ,
180+ CX_TypeClass_DependentSizedMatrix => "DependentSizedMatrix" ,
181+ CX_TypeClass_MemberPointer => "MemberPointer" ,
182+ CX_TypeClass_ObjCObjectPointer => "ObjCObjectPointer" ,
183+ CX_TypeClass_ObjCObject => "ObjCObject" ,
184+ CX_TypeClass_ObjCInterface => "ObjCInterface" ,
185+ CX_TypeClass_ObjCTypeParam => "ObjCTypeParam" ,
186+ CX_TypeClass_PackExpansion => "PackExpansion" ,
187+ CX_TypeClass_Paren => "Paren" ,
188+ CX_TypeClass_Pipe => "Pipe" ,
189+ CX_TypeClass_Pointer => "Pointer" ,
190+ CX_TypeClass_LValueReference => "LValueReference" ,
191+ CX_TypeClass_RValueReference => "RValueReference" ,
192+ CX_TypeClass_SubstTemplateTypeParmPack => "SubstTemplateTypeParmPack" ,
193+ CX_TypeClass_SubstTemplateTypeParm => "SubstTemplateTypeParm" ,
194+ CX_TypeClass_Enum => "Enum" ,
195+ CX_TypeClass_Record => "Record" ,
196+ CX_TypeClass_TemplateSpecialization => "TemplateSpecialization" ,
197+ CX_TypeClass_TemplateTypeParm => "TemplateTypeParm" ,
198+ CX_TypeClass_TypeOfExpr => "TypeOfExpr" ,
199+ CX_TypeClass_TypeOf => "TypeOf" ,
200+ CX_TypeClass_Typedef => "Typedef" ,
201+ CX_TypeClass_UnaryTransform => "UnaryTransform" ,
202+ CX_TypeClass_UnresolvedUsing => "UnresolvedUsing" ,
203+ CX_TypeClass_Using => "Using" ,
204+ CX_TypeClass_Vector => "Vector" ,
205+ CX_TypeClass_ExtVector => "ExtVector" ,
204206 _ => TypeClass . ToString ( ) [ 13 ..] ,
205207 } ;
206208 }
207209 }
208210
209- public CXString TypedefName => ( kind != CXTypeKind . CXType_Invalid ) ? clang . getTypedefName ( this ) : default ;
211+ public CXString TypedefName => ( kind != CXType_Invalid ) ? clang . getTypedefName ( this ) : default ;
210212
211- public CXCursor UnderlyingExpr => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getUnderlyingExpr ( this ) : default ;
213+ public CXCursor UnderlyingExpr => ( kind != CXType_Invalid ) ? clangsharp . Type_getUnderlyingExpr ( this ) : default ;
212214
213- public CXType UnderlyingType => ( kind != CXTypeKind . CXType_Invalid ) ? clangsharp . Type_getUnderlyingType ( this ) : default ;
215+ public CXType UnderlyingType => ( kind != CXType_Invalid ) ? clangsharp . Type_getUnderlyingType ( this ) : default ;
214216
215217 public CXType ValueType => clang . Type_getValueType ( this ) ;
216218
0 commit comments