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

Compare:
```
$ echo '[[deprecated]] struct A {} a;' | clang -Xclang -ast-print -xc 
-fsyntax-only -
[[deprecated("")]] struct A {
} a;

$ echo '[[deprecated]] struct A {};' | clang -Xclang -ast-print -xc 
-fsyntax-only -
<stdin>:1:22: error: misplaced attributes; expected attributes here
    1 | [[deprecated]] struct A {};
      | ~~~~~~~~~~~~~~       ^
      |                      [[deprecated]]
struct A {
};
1 error generated.
```


https://github.com/llvm/llvm-project/pull/174197
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to