Getting underlying type for `using typename` declaration

Hi CFE users!

I am trying to get a QualType instance from UnresolvedUsingTypenameDecl. Unlike TypeAliasDecl UnresolvedUsingTypenameDecl does not have a getUnderlyingType method.

I could not find a way to construct one from the DeclarationNameInfo (getNameInfo) and NestedNameSpecifier (getQualifier).

The library I am working on already supports type aliases, and I was hoping I could treat using typename declarations in a similar way. Not sure if it is the right way though.

Regards,

Victor

Hi CFE users!

I am trying to get a QualType instance from UnresolvedUsingTypenameDecl. Unlike TypeAliasDecl UnresolvedUsingTypenameDecl does not have a getUnderlyingType method.

I could not find a way to construct one from the DeclarationNameInfo (getNameInfo) and NestedNameSpecifier (getQualifier).

You could build a suitable QualType by calling Sema::CheckTypenameType(ETK_Typename, U->getTypenameLoc(), U->getQualifierLoc(), U->getIdentifier(), U->getLocation()).