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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to