[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 2 09:46:08 PDT 2021


ldionne added a comment.

In D100581#2793926 <https://reviews.llvm.org/D100581#2793926>, @dblaikie wrote:

> In D100581#2793775 <https://reviews.llvm.org/D100581#2793775>, @ldionne wrote:
>
>> Hello! There are still some false positives, for example this one is breaking the libc++ CI: https://buildkite.com/llvm-project/libcxx-ci/builds/3530#8679608a-200b-4a48-beb4-a9e9924a8848
>>
>> Would it be possible to either fix this quickly or revert the change until the issue has been fixed? Our pre-commit CI is going to be stalled until this is fixed. Thanks!
>
> Looks like a true positive in libc++ ( https://github.com/llvm/llvm-project/blob/main/libcxx/include/regex ) - the "__j" variable is initialized, then incremented, but never read (except to increment). Is that a bug in libc++? Was __j meant to be used for something?

Oh, you're right! I was tripped by the fact that we did in fact "use" `__j` (in the sense that we do `__j += ...`), but indeed we never read the result. I'll work on fixing that issue. I'm not sure whether it's a bug or not yet, that code was modified 11 years ago, but I'll do my research.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100581



More information about the cfe-commits mailing list