Issue 155416
Summary False positive of uninitialized base in cppcoreguidelines-pro-type-member-init
Labels clang-tidy, false-positive
Assignees
Reporter chfast
    ```cpp
struct S;  // forward declaration is needed

struct S
{
     int a;
};

struct C : S
{
    C() : S{0} {}
};
```

```
<source>:10:5: warning: constructor does not initialize these bases: S [cppcoreguidelines-pro-type-member-init]
   10 |     C() : S{0} {}
      | ^
      |           S(),
1 warning generated.
```

https://godbolt.org/z/7b8cTP7G7
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to