<html>
    <head>
      <base href="https://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 - Coverage with option "--coverage" instruments sanitizer's code."
   href="https://bugs.llvm.org/show_bug.cgi?id=42106">42106</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Coverage with option "--coverage" instruments sanitizer's code.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>8.0
          </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>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>profile
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>valerakonychev@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22065" name="attach_22065" title="cov.main.c.html">attachment 22065</a> <a href="attachment.cgi?id=22065&action=edit" title="cov.main.c.html">[details]</a></span>
cov.main.c.html

If code is compiled with options "--coverage" and "-fsanitize", result coverage
report will contain information about branches of sanitizers code. 

For example, I compiled simple program main.c:
clang -O0 -g --coverage -fsanitize=address,undefined main.c -o main

int main()
{
    float a = 1.0;
    return 0;
}

llvm-cov gcov main.c shows:
        -:    0:Source:main.c
        -:    0:Graph:main.gcno
        -:    0:Data:main.gcda
        -:    0:Runs:1
        -:    0:Programs:1
        -:    1:int main()
        -:    2:{
        2:    3:    float a = 1.0; // !!!!!! Problem !!!!!!!
        1:    4:    return 0;
        1:    5:}


Result html report made with gcovr:
gcovr --html --html-details --gcov-executable='llvm-cov gcov' -r . -o cov.html

I've attached report in cov.main.c.html

The report shows coverage assumes there is an branch at the line '3:    float a
= 1.0;'. This branch is added by sanitizer's code, I've checked it by excluding
option "-fsanitize".</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>