dotnet/roslyn
View on GitHubRefactor `CheckFeatureAvailability` to not accept a `Location` parameter
Open
#68,935 opened on Jul 8, 2023
Area-CompilersArea-Performancehelp wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (Avg merge 6d 17h) (256 merged PRs in 30d)
Description
Currently, CheckFeatureAvailability overloads take a Location parameter. Causing caller to call syntaxNode.Location which allocates a SourceLocation. At the end, if the feature is available, the allocation is thrown away.
Example:
Not sure how much this pattern is hit, but it's good to optimize this anyway.