[clang] [clang-tools-extra] [Clang][Sema]Report error for non-base types in constructor initializers before causing issue in initializer order (PR #201379)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 25 05:49:14 PDT 2026


zwuis wrote:

I found another test case:

```cpp
struct S {
  S(int) {}
  template <typename T> // valid iff T = S
  S(const T&) : T(42) {}
};
```

It seems that we should diagnose it in `Sema::ActOnMemberInitializers` (ends with 's', not `Sema::ActOnMemberInitializer`).

https://github.com/llvm/llvm-project/pull/201379


More information about the cfe-commits mailing list