[PATCH] D99983: Provide TreeTransform::TransformAttr the transformed statement; NFC

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 6 11:53:18 PDT 2021


aaron.ballman created this revision.
aaron.ballman added reviewers: rsmith, haberman.
aaron.ballman requested review of this revision.
Herald added a project: clang.

It is useful statement an attribute is being applied to when performing semantic processing of the attribute during template instantiation. This functionality is not currently needed by existing attributes, but is anticipated to be used by new attributes being worked on.

One design choice with this is whether to transform attributes then the attributed statement, or to transform the attributed statement and then the attributes. I elected to transform the attributed statement first because it seems less likely that the statement transformation would require the instanatiated attributes compared to when we transform attributes (those would benefit from knowing the fully instantiated statement). This patch passes a non-`const Stmt *` to `TransformAttr()` in case the attribute instantiation needs to modify the attributed statement for some reason.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99983

Files:
  clang/lib/Sema/SemaTemplateInstantiate.cpp
  clang/lib/Sema/TreeTransform.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99983.335616.patch
Type: text/x-patch
Size: 4941 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210406/d18e3b8a/attachment.bin>


More information about the cfe-commits mailing list