Skip to content

Conversation

@aviralg
Copy link
Contributor

@aviralg aviralg commented Oct 20, 2025

If SkipFunctionBodies is not None, functions that are inlinable or not used for the result are not typechecked. The absence of type information crashes the performance hint analyzer. This change prevents the analyzer from running in these cases.

@aviralg
Copy link
Contributor Author

aviralg commented Oct 20, 2025

@swift-ci Test

Copy link
Contributor

@artemcm artemcm left a comment

Choose a reason for hiding this comment

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

Could you please add a simple lit test which passes in a primary source file and a secondary source file and ensure no diagnostics are emitted for the secondary?

@aviralg aviralg force-pushed the aviralgoel/performance-hints/ensure-primary-source-file branch from d777ae8 to dedba4d Compare October 20, 2025 23:28
@aviralg
Copy link
Contributor Author

aviralg commented Oct 20, 2025

@swift-ci Test

@aviralg aviralg force-pushed the aviralgoel/performance-hints/ensure-primary-source-file branch from dedba4d to 63246b9 Compare October 21, 2025 02:22
@aviralg
Copy link
Contributor Author

aviralg commented Oct 21, 2025

@swift-ci Test

@artemcm
Copy link
Contributor

artemcm commented Oct 21, 2025

@swift-ci smoke test

@artemcm artemcm enabled auto-merge October 21, 2025 16:54
@artemcm artemcm disabled auto-merge October 21, 2025 20:30
…me function bodies

If `SkipFunctionBodies` is not `None`, functions that are inlinable or not used
for the result are not typechecked. The absence of type information crashes the
performance hint analyzer. This change prevents the analyzer from running in
these cases.
@aviralg aviralg force-pushed the aviralgoel/performance-hints/ensure-primary-source-file branch from 63246b9 to dbe97e9 Compare October 22, 2025 18:25
@artemcm
Copy link
Contributor

artemcm commented Oct 22, 2025

@swift-ci test

@aviralg aviralg changed the title [Performance Hints] Restrict analysis to primary source files [Performance Hints] Disable performance hints if typechecker can skip function bodies Oct 22, 2025
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