Biohazrd icon indicating copy to clipboard operation
Biohazrd copied to clipboard

Clang type classes meta issue

Open PathogenDavid opened this issue 3 years ago • 0 comments

We only handle a handful of the possible Type variants exposed by ClangSharp. Below is a list of all of them, we need to eventually investigate all of the unchecked ones to determine what they are and whether we need to handle them:

  • [ ] AdjustedType
    • [ ] DecayedType
  • [ ] ArrayType
    • [x] ConstantArrayType
      • [x] Parameters
      • [x] Fields
    • [ ] DependentSizedArrayType - These are arrays sized by a template parameter
    • [x] IncompleteArrayType - Unsized arrays (IE: int x[])
      • [x] Parameters
      • [ ] Can these appear in other places?
    • [ ] VariableArrayType
  • [ ] AtomicType
  • [x] AttributedType https://github.com/InfectedLibraries/Biohazrd/issues/124
  • [ ] BlockPointerType
  • [x] BuiltinType -- BuiltinType is not handled in any one location, and not all types are supported. We do use it to filter, but we have to use Type.Kind to get the actual builtin type. See https://github.com/InfectedLibraries/Biohazrd/issues/46 for details.
  • [ ] ComplexType
  • [x] DecltypeType -- decltype(T)
  • [ ] DeducedType
    • [x] AutoType -- The magic auto type
    • [ ] DeducedTemplateSpecializationType
  • [ ] DependentAddressSpaceType
  • [ ] DependentSizedExtVectorType
  • [ ] DependentVectorType
  • [ ] ExtVectorType
  • [ ] FunctionType
    • [ ] FunctionNoProtoType
    • [x] FunctionProtoType
  • [ ] InjectedClassNameType
  • [ ] MacroQualifiedType
  • [ ] MemberPointerType
  • [x] ~~ObjCObjectPointerType~~ Out of scope: Objective C
  • [x] ~~ObjCObjectType~~ Out of scope: Objective C
    • [x] ~~ObjCInterfaceType~~ Out of scope: Objective C
  • [x] ~~ObjCTypeParamType~~ Out of scope: Objective C
  • [ ] PackExpansionType
  • [ ] ParenType
  • [ ] PipeType
  • [x] PointerType
  • [x] ReferenceType
  • [ ] SubstTemplateTypeParmPackType
  • [ ] SubstTemplateTypeParmType
  • [ ] TagType
    • [x] EnumType
    • [x] RecordType
  • [ ] TemplateSpecializationType
  • [ ] TemplateTypeParmType
  • [x] TypedefType -- If the Clang decl is attached to a TranslatedDeclaration, we translate as a type reference. Otherwise we ignore the typedef and translate as the canonical type.
  • [ ] TypeOfExprType
  • [ ] TypeOfType
  • [ ] TypeWithKeyword
    • [ ] DependentNameType
    • [ ] DependentTemplateSpecializationType
    • [x] ElaboratedType - These are namespace-qualified types (like physx::PxU32)
  • [ ] UnaryTransformType
  • [ ] UnresolvedUsingType
  • [ ] VectorType

I suspect many of them probably can't even appear in declaration contexts, but we should check for sure and explicitly error if they appear.

PathogenDavid avatar Sep 11 '20 20:09 PathogenDavid