8000 Why does the branch coverage of all files show as 0% when using llvm-cov to analyze Swift files? · Issue #81730 · swiftlang/swift · GitHub
[go: up one dir, main page]

Skip to content

Why does the branch coverage of all files show as 0% when using llvm-cov to analyze Swift files? #81730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ZhengXiuQun opened this issue May 23, 2025 · 3 comments
Labels
code coverage Area → source tooling: code coverage compiler The Swift compiler itself feature A feature request or implementation IRGen LLVM IR generation swift 6.2 unexpected behavior Bug: Unexpected behavior or incorrect output

Comments

@ZhengXiuQun
Copy link

Description

Why does the branch coverage of all files show as 0% when using llvm-cov to analyze Swift files? The llvm developer replied that it is because Swift does not support generating branch coverage. Is that true?

Reproduction

Expected behavior

Why does the branch coverage of all files show as 0% when using llvm-cov to analyze Swift files?

Environment

Latest

Additional information

Why does the branch coverage of all files show as 0% when using llvm-cov to analyze Swift files?

@ZhengXiuQun ZhengXiuQun added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels May 23, 2025
@hamishknight
Copy link
Contributor

The llvm developer replied that it is because Swift does not support generating branch coverage. Is that true?

This is correct, Swift only currently supports emitting code regions and skipped regions

@ZhengXiuQun
Copy link
Author

Is there a plan to support branch coverage?

@AnthonyLatsis AnthonyLatsis added compiler The Swift comp 8E81 iler itself IRGen LLVM IR generation code coverage Area → source tooling: code coverage unexpected behavior Bug: Unexpected behavior or incorrect output swift 6.2 and removed triage needed This issue needs more specific labels labels May 26, 2025
@hamishknight
Copy link
Contributor

It's something I'd like to do, but it's not on the immediate roadmap

@hamishknight hamishknight added feature A feature request or implementation and removed bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. labels May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code coverage Area → source tooling: code coverage compiler The Swift compiler itself feature A feature request or implementation IRGen LLVM IR generation swift 6.2 unexpected behavior Bug: Unexpected behavior or incorrect output
Projects
None yet
Development

No branches or pull requests

3 participants
0