PiotrZSL wrote:

" Checks that class members are initialized in constructors (implicitly or 
explicitly). Reports constructors or classes where class members are not 
initialized."
This is exacly what cppcoreguidelines-pro-type-member-init is doing.

And provide same warnings:
```
10:7: warning: constructor does not initialize these fields: X 
[cppcoreguidelines-pro-type-member-init]
50:8: warning: constructor does not initialize these fields: Y 
[cppcoreguidelines-pro-type-member-init]
```
The only warning that cppcoreguidelines-pro-type-member-init is doing does not 
provide is for implicitly deleted constructor, wiht is fine.
I didn't found any rule about this in Google codding standard.

Currently I dont see any reason for this check existence, and any benefit that 
it could bring over cppcoreguidelines-pro-type-member-init.
If somehow cppcoreguidelines-pro-type-member-init does not cover some important 
part, then basicly cppcoreguidelines-pro-type-member-init should be extended, 
or in extreame case just renamed into "bugprone-uninitialized-member", 
extended, and aliased into cppcoreguidelines or any other standards. Doing same 
thing from scrach and generate same kind of warnings is basicly reundant.



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

Reply via email to