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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to