[llvm-bugs] [Bug 30659] New: "llvm-cov show" displays suboptimal output when file is lacking coverage

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 11 11:00:20 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30659

            Bug ID: 30659
           Summary: "llvm-cov show" displays suboptimal output when file
                    is lacking coverage
           Product: new-bugs
           Version: 3.9
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dane at mapbox.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

If you run `llvm-cov show src/*cpp` and a file inside of `src/*cpp` lacks
coverage then coverage is successfully output for the files with coverage but a
confusing warning and error is displayed for the file that is not. I added a
blank file to replicate called ` src/foo.cpp` and the output was:


error: B?
         : No such file or directory
warning: The file 'B?
                     ' isn't covered.


Note: the exact command was `llvm-cov show
/Users/dane/projects/node-cpp-skel/lib/binding/hello_world.node
-instr-profile=code.profdata src/*.cpp -filename-equivalence -use-color` which
the shell expands to `llvm-cov show
/Users/dane/projects/node-cpp-skel/lib/binding/hello_world.node
-instr-profile=code.profdata src/foo.cpp src/hello_world.cpp
-filename-equivalence -use-color`.

I would expect the output to be something like: `warning: the file src/foo.cpp
isn't covered, skipping this file`

Also, and it appears that the order of files passed matters. If the
`src/foo.cpp` that lacks coverage is passed first then, like I describe above,
the coverage is output successfully for other files (src/hello_world.cpp in
this case) and the odd warning is harmless. But if `src/foo.cpp` is passed last
then no coverage is output for the file that needs it displayed and an error is
output like:

error: B@??    B@?: No such file or directory
warning: The file 'B@??    B@?' isn't covered.
warning: The file 'src/foo.cpp' isn't covered.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161011/9660e5fd/attachment.html>


More information about the llvm-bugs mailing list