Skip to content

Add a matcher for the name of a DependentScopeDeclRefExpr #121610

@HighCommander4

Description

@HighCommander4

In #120937 we added a new dependentScopeDeclRefExpr() matcher, for matching expression node of type DependentScopeDeclRefExpr.

To make this matcher more useful, it would be nice to have a matcher that can go inside dependentScopeDeclRefExpr() to narrow down the match to expressions referencing a particular name.

We have such a matcher for CXXDependentScopeMemberExpr, called hasMemberName(). I'm proposing we add something similar for DependentScopeDeclRefExpr.

We'll need to figure out what to name it. hasMemberName is not appropriate here, as DependentScopeDeclRefExpr does not necessarily name a class member. hasName sounds good but is already used for NamedDecl and I don't know how easy it would be to overload it. hasDependentName perhaps?

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions