[PATCH] D99896: Rework the way statement attributes are processed; NFC

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 5 13:14:29 PDT 2021


erichkeane added a comment.

It is really sad that the attributes can't 'auto transform' themselves.  ParsedAttr could (since it has a union of expressions/identifiers), but we don't really seem to have a good way to do it for Attr.

Could we possibly do some table-gen to auto create the 'simple' ones?  Basically, any parameter to an attribute that is an 'expr' gets auto-transformed?  Similar to how we have handleSimpleAttr, we could have TransformSimpleAttr (or, a generated one).



================
Comment at: clang/lib/Sema/TreeTransform.h:1316
                                    Stmt *SubStmt) {
-    return SemaRef.ActOnAttributedStmt(AttrLoc, Attrs, SubStmt);
+    return SemaRef.BuildAttributedStmt(AttrLoc, Attrs, SubStmt);
   }
----------------
Am I missing where the attributes themselves are being rebuilt/transformed??  




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99896



More information about the cfe-commits mailing list