[PATCH] D121715: [Clang] Fix an unused-but-set-variable warning with volatile variable

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 21 13:48:47 PDT 2022


efriedma accepted this revision.
efriedma added a comment.

In D121715#3397446 <https://reviews.llvm.org/D121715#3397446>, @yonghong-song wrote:

> 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.

Right, I wasn't suggesting you should add that in this patch.  Just a general observation about cases we should consider diagnosing in the future.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121715



More information about the cfe-commits mailing list