SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

Fix function pointer param args being qualified to outer class (#56217)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56217

Changelog: [Internal]

Doxygen may incorrectly cross-reference parameter names inside function
pointer types to member variables of the enclosing class. For example,
`void (*cb)(const void* data)` inside a class that has a `data` member
would produce `const void* Class::data` instead of
`const void* data` in the snapshot. This diff addresses two issues:

1. In `get_doxygen_params`, re-parse function pointer type strings
   through `parse_type_with_argstrings` which delegates to
   `_parse_single_argument` that already strips "::" from parameter
   names.
2. In `parse_type_with_argstrings`, recognize complex declarator groups
   starting with `*` or `&` (e.g. `*(*fp)(int)`) as non-argument-list
   parenthesized sections, preventing incorrect name extraction from
   nested function pointer declarators.

Reviewed By: cipolleschi

Differential Revision: D98118629

fbshipit-source-id: a8532e2adaec1dd2b50be8a20eae1068ac49d548
J
Jakub Piasecki committed
31f262ed2eead22a20eb640ebd1c63d7ad8ed579
Parent: cc9d06b
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com> on 3/26/2026, 3:40:54 PM