MTC added a comment.

In D106431#2892859 <https://reviews.llvm.org/D106431#2892859>, @whisperity 
wrote:

> Is this the right decision to make, conceptually? It will leave the variable 
> uninitialised still, and reading such an uninit variable is still an issue, 
> even if it is an enum.

Yeah, that's right. However, it's much more difficult to give enum an initial 
value than an integer.

> Could we consider the alternative of warning the user about the uninitialized 
> variable, just not offering an automatic (and potentially bad / incorrect) 
> fix?

Make sense, we (ByteDance) are also hesitating whether we should provide 
automatic repair for uninitialized variables, because automatic fix may change 
the program semantics.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106431/new/

https://reviews.llvm.org/D106431

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to