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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 31 11:40:10 PDT 2023


aaron.ballman added a comment.

In D152495#4631829 <https://reviews.llvm.org/D152495#4631829>, @nickdesaulniers wrote:

> Here's a more blatant regression caused by this patch.
>
> https://godbolt.org/z/q19Ge64G3
>
> Causing breakage for the Linux kernel:
> https://github.com/ClangBuiltLinux/linux/issues/1926

Because of the amount of disruption and the fact that we're trying to get 17.x out the door while transitioning to a new code review workflow, let's revert this for now. The `__attribute__((used))` problem seems to be something deeper, as `[[maybe_unused]]` does work properly (https://godbolt.org/z/e7YK1G69e), and putting this diagnostic under its own warning group will help folks adjust to the new behavior.


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