<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57388>57388</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang coverage reports zero count on line after an assert
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          hanickadot
      </td>
    </tr>
</table>

<pre>
    For code:

```c++
#include <cstdio>
#include <cassert>

int main(int argc, char ** argv) {
        puts("hello");
        assert(argc>=1);
        puts("ciau");
        return 0;
}
```

The line after `assert(argc>=1);` is marked as not covered:

![Screenshot 2022-08-26 at 17 10 23](https://user-images.githubusercontent.com/6557263/186936402-122bde9c-e814-481f-8250-e0f0e7b921ca.png)

When I expanded the `assert` macro to look what's going on inside I got:

```c++
#include <cstdio>
#include <stdlib.h>

#define assert(e)  \
    ((void) ((e) ? ((void)0) : __assert (#e, __FILE_NAME__, __LINE__)))
#define __assert(e, file, line) \
    ((void)printf ("%s:%d: failed assertion `%s'\n", file, line, e), abort())

int main(int argc, char ** argv) {
        puts("hello");
        assert(argc>=1);
        puts("ciau");
        return 0;
}
```

The line after the assert is still not matched...

![Screenshot 2022-08-26 at 17 12 13](https://user-images.githubusercontent.com/6557263/186936831-847f6b3f-4da2-42f9-ba0c-f7894874d700.png)

expected behaviour:

1) assert is marked as covered (and not expanded so the failure is not seen)
2) line after the assert is also marked as covered
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzdVE2P2zYQ_TXyhZBAUV_UQYeNvQYWSHJpgR4NihxZ7MqkIVJO2l_fIWXHu05SoEBONQhLmhnOm3l8w96qv7q9nYm0CpLiKaG7hN7-a7oumbAPYa1WVmgjp0UBSYqtdF5pmxTPP3QK52D2d2_818aTk9AmYTy8ivmI-bdEjmImCcMUT8F2SVhLkuYGStvz4h1uSRgbYZosPjEiKe4BVzDG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