aaron.ballman 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); } ---------------- haberman wrote: > 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? My thinking is: * From `handleMustTailAttr()` in SemaStmtAttr.cpp, call `CheckMustTailAttr()` to do the shared semantic checking. * Add a `TransformMustTailAttr()` to `TreeTransform`, have it call `SemaRef.CheckMustTailAttr()` as well. 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