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

Josh Haberman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 5 13:41:08 PDT 2021


haberman added inline comments.


================
Comment at: clang/lib/Sema/TreeTransform.h:1316
                                    Stmt *SubStmt) {
-    return SemaRef.ActOnAttributedStmt(AttrLoc, Attrs, SubStmt);
+    return SemaRef.BuildAttributedStmt(AttrLoc, Attrs, SubStmt);
   }
----------------
aaron.ballman wrote:
> erichkeane wrote:
> > Am I missing where the attributes themselves are being rebuilt/transformed??  
> > 
> > 
> The transformation happens in `TreeTransform<Derived>::TransformAttributedStmt()` which calls `RebuildAttributedStmt()` with the rebuilt attributes.
It appears that neither `TransformAttributedStmt()` nor `RebuildAttributedStmt()` calls `ProcessStmtAttributes()`, either directly or transitively, so I'm not seeing where we can run instantiation-time attribute processing logic. What am I missing?


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