xazax.hun added a comment. In https://reviews.llvm.org/D29839#674307, @Prazek wrote:
> In https://reviews.llvm.org/D29839#674301, @xazax.hun wrote: > > > Shouldn't this be a path sensitive check within the clang static analyzer > > instead? So branches are properly handled and interprocedural analysis is > > done. > > > Do you have some examples? I would argue, that even if you would have code > that firstly uses width(), and then after a while reads input, then this is > bugprone, and probably the line initializing width should be just before > reading. You are right, reasonable code sets the width right before reading the input. But do we only want to catch bugs in reasonable code? https://reviews.llvm.org/D29839 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits