[clang] Control spacing for attribute printing (PR #174197)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 5 06:53:34 PST 2026


================
@@ -1085,8 +1125,11 @@ void DeclPrinter::VisitCXXRecordDecl(CXXRecordDecl *D) {
 
   // FIXME: Move before printing the decl kind to match the behavior of the
----------------
AaronBallman wrote:

This also seems suspicious to me. It was added in https://github.com/llvm/llvm-project/pull/88600/ so maybe @vgvassilev remembers more about the FIXME?

You can put attributes before the tag but that requires a declaration of the tag type. e.g.,
```
[[deprecated]] struct A {} a; // Deprecates 'a' not 'A'
```

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


More information about the cfe-commits mailing list