[PATCH] D157394: [clang][DeclPrinter] Improve AST print of function attributes

Timo Stripf via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 10 01:29:16 PDT 2023


strimo378 added inline comments.


================
Comment at: clang/lib/AST/DeclPrinter.cpp:267
+    // C2x/C++11-style attributes must appear before the declarator.
+    if (S == Attr::AS_CXX11 || S == Attr::AS_C2x)
+      return AttrLocation::BeforeDecl;
----------------
strimo378 wrote:
> giulianobelinassi wrote:
> > You can use A->isStandardAttributeSyntax()
> Yes, ok
I checked isStandardAttributeSyntax(). I cannot use it since it also includes the alignas keyword for some strange reason.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157394/new/

https://reviews.llvm.org/D157394



More information about the cfe-commits mailing list