[PATCH] D132503: Add cxx scope if needed for requires clause.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 25 08:08:51 PDT 2022
ilya-biryukov added a subscriber: aaron.ballman.
ilya-biryukov added a comment.
Thanks for the fix. This looks ok to me, except that I am a bit suspicious of the fact that `DeclaratorScopeObj` is used somewhat rarely.
I suspect we might want a different guard class for this, e.g. something similar to `InitializerScopeRAII`.
But I do not enough of the details for the corresponding code to know what the implications of these choices are.
@aaron.ballman could you PTAL or suggest someone who can help review this change?
================
Comment at: clang/lib/Parse/ParseTemplate.cpp:294-299
+ if (DeclaratorInfo.getCXXScopeSpec().isValid()) {
+ if (Actions.ShouldEnterDeclaratorScope(
+ getCurScope(), DeclaratorInfo.getCXXScopeSpec())) {
+ DeclScopeObj.EnterDeclaratorScope();
+ }
+ }
----------------
Merging ifs should produce simpler code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132503/new/
https://reviews.llvm.org/D132503
More information about the cfe-commits
mailing list