File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -5862,12 +5862,15 @@ bool Parser::isDeclarationSpecifier(
5862
5862
[[fallthrough]];
5863
5863
case tok::kw_decltype: // decltype(T())::type
5864
5864
case tok::kw_typename: // typename T::type
5865
+ case tok::l_splice:
5865
5866
// Annotate typenames and C++ scope specifiers. If we get one, just
5866
5867
// recurse to handle whatever we get.
5867
5868
if (TryAnnotateTypeOrScopeToken (AllowImplicitTypename))
5868
5869
return true ;
5869
5870
if (TryAnnotateTypeConstraint ())
5870
5871
return true ;
5872
+ if (Tok.is (tok::annot_splice))
5873
+ return true ;
5871
5874
if (Tok.is (tok::identifier))
5872
5875
return false ;
5873
5876
Original file line number Diff line number Diff line change @@ -76,6 +76,10 @@ consteval auto decr(typename [:r_int:] p) -> [:r_const_int:] {
76
76
return p - 1 ;
77
77
}
78
78
static_assert (decr(13 ) == 12 );
79
+
80
+ // 'typename' should be optional in parameter declarations.
81
+ void fn ([:r_int:]);
82
+ class S { S([:r_int:]); };
79
83
} // in_fn_defs
80
84
81
85
// ======
You can’t perform that action at this time.
0 commit comments