Skip to content

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

Closed
j-piasecki wants to merge 4 commits intofacebook:mainfrom
j-piasecki:export-D98118629
Closed

Fix function pointer param args being qualified to outer class (#56217)#56217
j-piasecki wants to merge 4 commits intofacebook:mainfrom
j-piasecki:export-D98118629

Conversation

@j-piasecki
Copy link
Contributor

@j-piasecki j-piasecki commented Mar 25, 2026

Summary:

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

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 25, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 25, 2026

@j-piasecki has exported this pull request. If you are a Meta employee, you can view the originating Diff in D98118629.

@facebook-github-tools facebook-github-tools bot added p: Software Mansion Partner: Software Mansion Partner labels Mar 25, 2026
@facebook-github-tools facebook-github-tools bot added the p: Facebook Partner: Facebook label Mar 25, 2026
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 25, 2026
…ook#56217)

Summary:

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.

Differential Revision: D98118629
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 25, 2026
…ook#56217)

Summary:

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.

Differential Revision: D98118629
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 25, 2026
…ook#56217)

Summary:

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.

Differential Revision: D98118629
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 25, 2026
…ook#56217)

Summary:

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.

Differential Revision: D98118629
Jakub Piasecki added 3 commits March 25, 2026 23:59
Summary:
Changelog: [Internal]

Correctly handles array types in member definitions in the API snapshot.

Differential Revision: D97923375
Summary:
Changelog: [Internal]

When a class has multiple base classes, all defining a constructor with the same signature, the inherited constructors were being duplicated in the snapshot (for each base class).

This diff deduplicates them.

Differential Revision: D98102286
Summary:
Changelog: [Internal]

Snapshot generator was putting `[]` in wrong place when generating array type - it was adding it to the type name instead of the variable name. This diff addresses that.

Differential Revision: D98102328
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 26, 2026
…ook#56217)

Summary:

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
@meta-codesync meta-codesync bot changed the title Fix function pointer param args being qualified to outer class Fix function pointer param args being qualified to outer class (#56217) Mar 26, 2026
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 26, 2026
…ook#56217)

Summary:

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
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 26, 2026
…ook#56217)

Summary:

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
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 26, 2026
…ook#56217)

Summary:

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
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 26, 2026
…ook#56217)

Summary:

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
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request Mar 26, 2026
…ook#56217)

Summary:

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
…ook#56217)

Summary:
Pull Request resolved: facebook#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
@meta-codesync meta-codesync bot closed this in 31f262e Mar 26, 2026
@facebook-github-tools facebook-github-tools bot added the Merged This PR has been merged. label Mar 26, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 26, 2026

This pull request has been merged in 31f262e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant