<html>
<head>
<base href="http://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - llvm-cov shows one arm of ?: expression in red"
href="http://bugs.llvm.org/show_bug.cgi?id=32019">32019</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>llvm-cov shows one arm of ?: expression in red
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jay.foad@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>