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

Change how DeclRef::toText works #5592

Merged
merged 4 commits into from
Nov 21, 2024

Conversation

saipraveenb25
Copy link
Collaborator

We now ignore the decl-ref heirarchy since that only includes nodes with specialization info & simply walk up the tree of decls, while emitting any specializations present in the decl-ref.

Fixes: #5591

We now ignore the decl-ref heirarchy since that only includes nodes with specialization info & simply walk up the tree of decls, while emitting any specializations present in the decl-ref.
@saipraveenb25 saipraveenb25 requested a review from a team as a code owner November 19, 2024 18:50
@saipraveenb25 saipraveenb25 added the pr: non-breaking PRs without breaking changes label Nov 19, 2024
Copy link
Collaborator

@csyonghe csyonghe left a comment

Choose a reason for hiding this comment

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

Instead of changing DeclRef::toText, which mess up all the tests, you can use ASTPrinter to get the full qualified name of a declref.

Call ASTPrinter::addOverridableDeclPath and then grab the content of the astprinter's string builder.

@saipraveenb25
Copy link
Collaborator Author

@csyonghe I fixed up the failing tests. (Only a couple of them were failing)
Further, one of those tests required this fix: tests/diagnostics/mismatching-types.slang was expecting full names for the nested types, but had the same problem that only a subset of the nodes were printed out.

@saipraveenb25 saipraveenb25 merged commit e9caf5d into shader-slang:master Nov 21, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Reflection API] getFullName() does not return a fully-qualified name in many cases.
2 participants