Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clangsharp_Type_getTemplateArgument for record decl #337

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

xoofx
Copy link
Member

@xoofx xoofx commented Apr 15, 2022

Hey,
While trying to upgrade CppAst to 14.0, I got into trouble with clangsharp_Type_getTemplateArgument that was not able to recover template arguments for a record/struct:

template <typename T, typename U>
struct TemplateStruct
{
    T field0;
    U field1;
};

struct Struct2
{
};

TemplateStruct<int, Struct2> exposed;

This PR is trying to fix the issue by using the same code that is in clang_Type_getNumTemplateArguments/Type.GetTemplateArguments.

@tannergooding tannergooding merged commit 9b0e610 into dotnet:main Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants