[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 11 10:17:26 PDT 2025


https://github.com/PiotrZSL approved this pull request.

Change looks correct, but looks like this check got one more limitation in case of code like this:

```
class CastInit {
  CastInit() : m(static_cast<int>(9)) {}
  int m = 9;
};
```

And this:

```
```
class CastInit {
  CastInit() : m(static_cast<int>(0)) {}
  int m {};
};
```
```

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


More information about the cfe-commits mailing list