[PATCH] D99896: Rework the way statement attributes are processed; NFC
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 5 13:08:01 PDT 2021
aaron.ballman created this revision.
aaron.ballman added reviewers: rsmith, haberman, erichkeane.
aaron.ballman requested review of this revision.
Herald added a project: clang.
This changes our approach to processing statement attributes to be more similar to how we process declaration attributes. Namely, `ActOnAttributedStmt()` now calls `ProcessStmtAttributes()` instead of vice-versa, and there is now an interface split between building an attributed statement where you already have a list of semantic attributes and building an attributed statement with attributes from the parser.
This should make it easier to support statement attributes that are dependent on a template. In that case, you would add a `TransformFooAttr()` function in `TreeTransform.h` to perform the semantic checking (morally similar to how `Sema::InstantiateAttrs()` already works for declaration attributes) when transforming the semantic attribute at instantiation time.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D99896
Files:
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseStmt.cpp
clang/lib/Sema/SemaStmt.cpp
clang/lib/Sema/SemaStmtAttr.cpp
clang/lib/Sema/TreeTransform.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99896.335309.patch
Type: text/x-patch
Size: 6081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210405/15464596/attachment-0001.bin>
More information about the cfe-commits
mailing list