[PATCH] D152495: [Clang][SemaCXX] Add unused warning for variables declared in condition expressions

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 30 09:28:41 PDT 2023


cor3ntin added a comment.

It is used, but only in an assert. Seems like the right fix!

In D152495#4628778 <https://reviews.llvm.org/D152495#4628778>, @smeenai wrote:

> In D152495#4628028 <https://reviews.llvm.org/D152495#4628028>, @goncharov wrote:
>
>> there is a number of unused vaiables in conditional loops that are firing now, I have submitted  https://github.com/llvm/llvm-project/commit/74f4daef0412be33002bd4e24a30cb47d0187ecf but I suspect it's just a start.
>> How did you checked the project code for that?
>
> Per rG01b88dd66d9d52d3f531a7d490e18c549f36f445 <https://reviews.llvm.org/rG01b88dd66d9d52d3f531a7d490e18c549f36f445>, unused `dyn_cast` results should turn into `isa`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152495



More information about the cfe-commits mailing list