Skip to content

Improve Natvis WildCard Matching#1547

Merged
WardenGnaw merged 1 commit intomainfrom
dev/waan/bug1162
Mar 12, 2026
Merged

Improve Natvis WildCard Matching#1547
WardenGnaw merged 1 commit intomainfrom
dev/waan/bug1162

Conversation

@WardenGnaw
Copy link
Member

This PR fixes the issue of how natvis matches which multi-templated arguments.

E.g. <> would be selected over <, *, *>.

This now will pick the first highest templated argument count but also prefer concrete template args over wildcards at the same arg count.

E.g. If you had natvis for <*, > and are visualizing <, *, *, > you will get the <, *> view.

There was also an issue with expression substitution to skip identifiers preceded by member-access operators (., ->, ::) so that sub-expressions like "ptr->member" are not incorrectly replaced with root-level lookups

Added tests.

Addresses #1162

This PR fixes the issue of how natvis matches which multi-templated
arguments.

E.g. <*> would be selected over <*, *, *>.

This now will pick the first highest templated argument count, but also
FindBestMatch to prefer concrete template args over wildcards at the same arg count.

E.g. If you had natvis for <*, *> and are visualizing <*, *, *, *> you
will get the <*, *> view.

There was also an issue with expression substitution to skip identifiers preceded by
member-access operators (., ->, ::) so that sub-expressions like
"ptr->member" are not incorrectly replaced with root-level lookups

Added tests.
@WardenGnaw WardenGnaw merged commit a1034b0 into main Mar 12, 2026
10 of 16 checks passed
@WardenGnaw WardenGnaw deleted the dev/waan/bug1162 branch March 12, 2026 19:01
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