File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -5862,12 +5862,15 @@ bool Parser::isDeclarationSpecifier(
58625862 [[fallthrough]];
58635863 case tok::kw_decltype: // decltype(T())::type
58645864 case tok::kw_typename: // typename T::type
5865+ case tok::l_splice:
58655866 // Annotate typenames and C++ scope specifiers. If we get one, just
58665867 // recurse to handle whatever we get.
58675868 if (TryAnnotateTypeOrScopeToken (AllowImplicitTypename))
58685869 return true ;
58695870 if (TryAnnotateTypeConstraint ())
58705871 return true ;
5872+ if (Tok.is (tok::annot_splice))
5873+ return true ;
58715874 if (Tok.is (tok::identifier))
58725875 return false ;
58735876
Original file line number Diff line number Diff line change @@ -76,6 +76,10 @@ consteval auto decr(typename [:r_int:] p) -> [:r_const_int:] {
7676 return p - 1 ;
7777}
7878static_assert (decr(13 ) == 12 );
79+
80+ // 'typename' should be optional in parameter declarations.
81+ void fn ([:r_int:]);
82+ class S { S([:r_int:]); };
7983} // in_fn_defs
8084
8185 // ======
You can’t perform that action at this time.
0 commit comments