[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 12:43:07 PDT 2022


efriedma added a comment.

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.


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