[llvm-bugs] [Bug 32019] New: llvm-cov shows one arm of ?: expression in red

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 20 03:57:46 PST 2017


http://bugs.llvm.org/show_bug.cgi?id=32019

            Bug ID: 32019
           Summary: llvm-cov shows one arm of ?: expression in red
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: jay.foad at gmail.com
                CC: llvm-bugs at lists.llvm.org

In this example, both arms of a ?: expression should be executed, but llvm-cov
shows one of them in red as if it was not executed.

$ cat z.c
int f(int x) {
        return x?3:4;
}
int main() {
        f(0);
        f(1);
}
$ clang -fprofile-instr-generate -fcoverage-mapping -o z z.c
$ ./z
$ llvm-profdata merge default.profraw -o merged.profdata
$ llvm-cov show -instr-profile merged.profdata z -format html -output-dir .
$ xdg-open index.html

Note that the "4" on line 2 of z.c is coloured red.

I'm using llvm and clang built from source at r295326.

-- 
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/20170220/314c627c/attachment.html>


More information about the llvm-bugs mailing list