[PATCH] D29839: [clang-tidy] New misc-istream-overflow check
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 11 03:31:23 PST 2017
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
More information about the cfe-commits
mailing list