The Binder currently resolves attribute definition names by converting the syntax node back to text and reparsing it:
TryGetAttributeDefinitionName(syntaxNode.ToString())
That is brittle and unnecessary. This path only applies to custom attributes, so we should extract the name directly from the syntax node instead of round-tripping through text.
File: src/MLIR/Semantics/Binder.cs
Context: the attribute binding path near the canonicalName lookup.
Suggested follow-up:
- inspect the custom attribute syntax node shape directly
- derive the canonical name without
ToString()
- keep the lookup logic aligned with the actual parsed syntax tree
The Binder currently resolves attribute definition names by converting the syntax node back to text and reparsing it:
TryGetAttributeDefinitionName(syntaxNode.ToString())That is brittle and unnecessary. This path only applies to custom attributes, so we should extract the name directly from the syntax node instead of round-tripping through text.
File: src/MLIR/Semantics/Binder.cs
Context: the attribute binding path near the canonicalName lookup.
Suggested follow-up:
ToString()