aaron.ballman added a comment.

In https://reviews.llvm.org/D39121#911745, @aaron.ballman wrote:

> Hmm, this is a good point -- I was thinking of the generic +N case with the 
> original example, but with an explicit +1, you can't run into that situation 
> with Win32 APIs. I will think on this a bit further and report back when I 
> have a spare moment.


I think I've convinced myself that because we're limiting this check to just +1 
and not +N, the current approach is fine. We should leave in the 
parens-to-silence behavior and the existing fixit to move the addition to the 
result, but we don't need to call it out in the diagnostic text (the 
documentation should be sufficient).

I would still appreciate verification that this doesn't have a high fp rate 
against some real world code bases just to be sure of my intuition.


https://reviews.llvm.org/D39121



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

Reply via email to