================
@@ -2591,21 +2592,30 @@ bool Parser::ParseCXXMemberDeclaratorBeforeInitializer(
BitfieldSize = ParseConstantExpression();
if (BitfieldSize.isInvalid())
SkipUntil(tok::comma, StopAtSemi | StopBeforeMatch);
- } else if (Tok.is(tok::kw_requires)) {
- TemplateParameterDepthRAII CurTemplateDepthTracker(TemplateParameterDepth);
- // With abbreviated function templates - we need to explicitly add depth to
- // account for the implicit template parameter list induced by the
template.
- if (DeclaratorInfo.getTemplateParameterLists().empty() &&
- DeclaratorInfo.getInventedTemplateParameterList())
- ++CurTemplateDepthTracker;
- ParseTrailingRequiresClauseWithScope(DeclaratorInfo);
} else {
- ParseOptionalCXX11VirtSpecifierSeq(
- VS, getCurrentClass().IsInterface,
- DeclaratorInfo.getDeclSpec().getFriendSpecLoc());
- if (!VS.isUnset())
- MaybeParseAndDiagnoseDeclSpecAfterCXX11VirtSpecifierSeq(DeclaratorInfo,
- VS);
+ // Requires clause can't follow 'override' but contracts can follow
----------------
erichkeane wrote:
I didn't see any tests with `requires`, `override/virtual` then `pre`? Can we
make sure we have them?
https://github.com/llvm/llvm-project/pull/221139
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits