Skip to content

Conversation

AlexeySachkov
Copy link
Contributor

This PR fixes type name that is being printed as free function kernel argument type in its forward-declaration in the integration header.

Before the change, we used the original argument type name, which could be an alias - this patch makes use of the canonical type's name to make sure that all type aliases are "unwrapped".

This PR fixes type name that is being printed as free function kernel
argument type in its forward-declaration in the integration header.

Before the change, we used the original argument type name, which could
be an alias - this patch makes use of the canonical type's name to make
sure that all type aliases are "unwrapped".
template<typename T>
[[__sycl_detail__::add_ir_attributes_function("sycl-nd-range-kernel", 2)]]
void bar_using(ns::BarUsing<T> Arg) {}
template void bar_using(ns::BarUsing<int>);
Copy link
Contributor

@Fznamznon Fznamznon Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does something like

class A {
    public:
    using B = int;
};

void freefu(A::B a) {

}

work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it works, I added it as a test case in e327133

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.

2 participants