<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 - llvm-cov: Wrong coverage with multiple binaries and shared code"
   href="https://bugs.llvm.org/show_bug.cgi?id=35490">35490</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llvm-cov: Wrong coverage with multiple binaries and shared code
          </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>normal
          </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>dennis.felsing@sap.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=19501" name="attach_19501" title="run.sh">attachment 19501</a> <a href="attachment.cgi?id=19501&action=edit" title="run.sh">[details]</a></span>
run.sh

Even with differently named functions the combined coverage seems wrong. In the
attached example I would expect w() in w.hpp to be covered.

If the implementation of w() is changed to 

    if (i == 0) {
        std::cout << "foo" << std::endl;
    }

There is a warning from llvm-cov:

warning: 1 functions have mismatched data

But in the attached example llvm-cov does not warn and shows wrong coverage for
w() instead.</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>