[llvm] [NFC][CodingStandard] Require``[[maybe_unused]]`` for unused variables in asserts (PR #142850)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 01:41:25 PDT 2025
================
@@ -591,6 +591,8 @@ rather than C-style casts. There are two exceptions to this:
* When casting to ``void`` to suppress warnings about unused variables (as an
alternative to ``[[maybe_unused]]``). Prefer C-style casts in this instance.
+ Note that if the variable is unused because its used only in ``assert``, use
----------------
jh7370 wrote:
```suggestion
Note that if the variable is unused because it's used only in ``assert``, use
```
https://github.com/llvm/llvm-project/pull/142850
More information about the llvm-commits
mailing list