Issue 164448
Summary Source-based coverage reports a static consteval struct method as uncovered
Labels coverage
Assignees
Reporter chfast
    Clang source-based coverage ignores top-level `consteval` function, but not the `static consteval` methods of a struct.

```cpp
consteval int g() { return 0; }

struct S
{
    static consteval int s() { return 1; }
};

int main()
{
    [[maybe_unused]] auto i = g();
    [[maybe_unused]] auto j = S::s();
    return 0;
}
```

```
    1|       |consteval int g() { return 0; }
    2|       |
    3|       |struct S
    4|       |{
    5| 0|    static consteval int s() { return 1; }
    6|       |};
    7| |
    8|       |int main()
    9|      1|{
   10|      1| [[maybe_unused]] auto i = g();
   11|      1|    [[maybe_unused]] auto j = S::s();
   12|      1|    return 0;
   13|      1|}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to