]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: adjust comment wording in cp_parser_init_declarator
authorbenwu25 <soggysocks206@gmail.com>
Wed, 17 Dec 2025 13:54:00 +0000 (20:54 +0700)
committerJason Merrill <jason@redhat.com>
Wed, 17 Dec 2025 13:54:00 +0000 (20:54 +0700)
It seems likely the original author meant to use either "and" or "for"
in this comment rather than both. We can remove the "for" to make it
slightly more clear that the declarator for the function-definition
and everything left in the function-definition would be handled here.

gcc/cp/ChangeLog:

* parser.cc (cp_parser_init_declarator): Adjust comment.

Signed-off-by: Ben Wu <soggysocks206@gmail.com>
gcc/cp/parser.cc

index be01cfdefe2b96101c973b5e5150e6ab61183230..d9c8cfada9354bb8a327d97cfa28984747e40f43 100644 (file)
@@ -24888,8 +24888,8 @@ omp_maybe_record_variant_base (cp_parser* parser, tree decl)
    befriended it).
 
    If FUNCTION_DEFINITION_ALLOWED_P then we handle the declarator and
-   for a function-definition here as well.  If the declarator is a
-   declarator for a function-definition, *FUNCTION_DEFINITION_P will
+   the rest of a function-definition here as well.  If the declarator is
+   declarator for a function-definition, *FUNCTION_DEFINITION_P will
    be TRUE upon return.  By that point, the function-definition will
    have been completely parsed.