[clang] [clang] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] (NFC) (PR #163914)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 17 08:27:24 PDT 2025


erichkeane 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;
      |   ^~~~~~~~~~~~~~~~
/local/home/ekeane/llvm-project/clang/lib/CIR/CodeGen/CIRGenValue.h:330:3: error: an attribute list cannot appear here
  330 |   [[maybe_unused]] unsigned aliasedFlag : 1;
      |   ^~~~~~~~~~~~~~~~
/local/home/ekeane/llvm-project/clang/lib/CIR/CodeGen/CIRGenValue.h:338:3: error: an attribute list cannot appear here
  338 |   [[maybe_unused]] unsigned overlapFlag : 1;

```

```
ekeane at dev-epyc4:/local/home/ekeane/llvm-project/build$ /usr/bin/clang++ --version 
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```

https://github.com/llvm/llvm-project/pull/163914


More information about the cfe-commits mailing list