RiverDave wrote:

> 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 {};
> };
> ```



> 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 {};
> };
> ```

Hadn't thought of this, but your idea makes sense, I'll try to implement it.

https://github.com/llvm/llvm-project/pull/129408
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to