Easy way find uninitialized member variables

后端 未结 11 956
时光说笑
时光说笑 2020-11-29 22:20

I am looking for an easy way to find uninitialized class member variables.

Finding them in either runtime or compile time is OK.

Currently

11条回答
  •  臣服心动
    2020-11-29 22:39

    Clang with clang-analyze is able to do this. It will event create a nice HTML report that indicates when the unused variable is accessed.

提交回复
热议问题