Skip to content
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

llvm-cov: Check that code exists on lines before marking as uncovered #109

Merged
merged 1 commit into from Aug 5, 2016

Conversation

@thatguystone
Copy link
Contributor

@thatguystone thatguystone commented Jul 23, 2015

llvm-cov sometimes outputs that non-code lines are uncovered (and
which lines it reports changes from version to version, and even
from -std=gnu++11 to -std=gnu++14). While llvm-cov should obviously
fix its own bug, this is a far quicker fix.

llvm-cov sometimes outputs that non-code lines are uncovered (and
which lines it reports changes from version to version, and even
from -std=gnu++11 to -std=gnu++14). While llvm-cov should obviously
fix its own bug, this is a far quicker fix.
@whart222
Copy link
Member

@whart222 whart222 commented Aug 5, 2016

Added issue #134, since we should be testing coverage with llvm

@whart222 whart222 merged commit 3ace223 into gcovr:master Aug 5, 2016
@whart222

This comment has been minimized.

Copy link
Member

@whart222 whart222 commented on 0cb3bfe Aug 21, 2016

I'm wondering now if the omission of the '(', ')' and ';' characters is an error. These are arguably part of blocks in user code. Was this an intentional part of this commit?

This comment has been minimized.

Copy link
Contributor Author

@thatguystone thatguystone replied Aug 25, 2016

It's been a while since I looked at this, but IIRC, llvm-cov was doing something like this:

#include <list>
#include <string>

class Test {
    std::list<std::string> a_;

public:
    Test(std::list<std::string> a) : a_(a) {}
};

int main() {
    Test({ // Covered
        "a", "b", "c", "d", // Covered
    }); // Uncovered
}

Obviously, the final line is covered, but it was reporting that it wasn't.

I just checked this again with clang/llvm-cov 3.6.2 (version currently in Debian/testing) using d701d30 (current master), and it seems to be working fine without ( ) ;.

JamesReynolds pushed a commit to JamesReynolds/gcovr that referenced this pull request Mar 8, 2018
llvm-cov: Check that code exists on lines before marking as uncovered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants