yonghong-song added a comment. In D121715#3397407 <https://reviews.llvm.org/D121715#3397407>, @efriedma wrote:
> In D121715#3397215 <https://reviews.llvm.org/D121715#3397215>, @xbolva00 > wrote: > >> If there is j = j + 1 .. do we warn ? > > > > In D121715#3397237 <https://reviews.llvm.org/D121715#3397237>, @xbolva00 > wrote: > >> j++; >> >> Should not we warn in this case? (Currently no warning) > > We probably should warn in both those cases; the variable clearly isn't > "used" in any meaningful way. The 'j++' is not warned as it is not a BinaryOperator or CXXOperatorCallExpr so it is not handled and considered no warning by default. This patch intends to handle volatile variables. We can have another patch to deal with this specific case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121715/new/ https://reviews.llvm.org/D121715 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits