Git Product home page Git Product logo

Comments (6)

Zalathar avatar Zalathar commented on June 12, 2024 1

The else arm of the if expression gets its own region, even if there is no else in the source file.

In your example program the else arm isn't executed and has an execution count of 0.

In the C++ program, this fact is represented by the Branch Coverage column instead. (Rust currently doesn't support LLVM branch coverage mappings.)

from cargo-llvm-cov.

taiki-e avatar taiki-e commented on June 12, 2024 1

Are you referring to the fact that the uncovered else block isn’t highlighted on line 4?

Yes.

I'm not 100% certain that this should be considered a bug, but in any case, since this is a discussion about the behavior of rustc and not cargo-llvm-cov, it is better to discuss it in the rust-lang/rust and not in this repository.

from cargo-llvm-cov.

wintered avatar wintered commented on June 12, 2024

The else arm of the if expression gets its own region, even if there is no else in the source file.

Why in C++, the else branch does not get its own region even though it does in Rust?

from cargo-llvm-cov.

taiki-e avatar taiki-e commented on June 12, 2024

In Rust with branch coverage enabled (--branch, #8):

issue324-rust-branch-cov issue324-rust-branch-cov-2

from cargo-llvm-cov.

taiki-e avatar taiki-e commented on June 12, 2024

I believe this is an issue on the rustc rather than the cargo-llvm-cov.

Would you mind submitting an issue at https://github.com/rust-lang/rust?

from cargo-llvm-cov.

Zalathar avatar Zalathar commented on June 12, 2024

I’m not quite sure what the bug here is supposed to be.

Are you referring to the fact that the uncovered else block isn’t highlighted on line 4?

from cargo-llvm-cov.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.