[clang] [clang] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] (NFC) (PR #163914)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 17 09:48:28 PDT 2025
andykaylor wrote:
> This is causing a regression for me:
>
> ```
> In file included from /local/home/ekeane/llvm-project/clang/lib/CIR/CodeGen/CIRGenDeclOpenACC.cpp:13:
> In file included from /local/home/ekeane/llvm-project/clang/lib/CIR/CodeGen/CIRGenFunction.h:17:
> In file included from /local/home/ekeane/llvm-project/clang/lib/CIR/CodeGen/CIRGenCall.h:17:
> /local/home/ekeane/llvm-project/clang/lib/CIR/CodeGen/CIRGenValue.h:311:3: error: an attribute list cannot appear here
> 311 | [[maybe_unused]] unsigned destructedFlag : 1;
I ran into that problem before: https://github.com/llvm/llvm-project/pull/143994
I guess maybe I fixed it in the wrong way. Does moving `[[maybe_unused]]` before `LLVM_PREFERRED_TYPE` fix this for you?
https://github.com/llvm/llvm-project/pull/163914
More information about the cfe-commits
mailing list