breaking change: Support object member pointers - #165
Conversation
|
@codex review |
bfaf980 to
bdb9724
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfaf980cf8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0173586b9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 104d8c1bbc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
cxxheaderparser/cxxheaderparser/parser.py
Lines 2854 to 2856 in e1728ae
When an ordinary function-pointer declarator is redundantly grouped and one of its parameters is a member pointer, this scan mistakes the parameter's C::* for the outer declarator's operator because it searches the entire balanced token list without tracking nesting. For example, void ((*p)(int C::*)); is valid C++ and the ungrouped form now parses, but this form raises CxxParseError expecting PLACEHOLDER; restrict the search to the declarator portion/top-level nesting rather than parameter suffixes.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53b5afaafb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b849c2fce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
6b849c2 to
50c208b
Compare
50c208b to
5158cf4
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5158cf4a42
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
5158cf4 to
6b7ac8f
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b7ac8f2da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
6b7ac8f to
5e1b977
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
- Build declarations from the identifier outward to preserve pointer, reference, array, and function precedence at every nesting level. - Distinguish object declarators from complete type-ids and add an explicit member-pointer node. - Format varargs, noexcept, qualifiers, and trailing returns consistently.
- Parse function-type cv/ref qualifiers and noexcept independently from ordinary function declarations. - Reuse one function-type construction path across typedefs, pointers, and named function parameters. - Preserve semantics when parsed function types are formatted again.
- Model class-member indirection as its own declarator node instead of storing an owner on FunctionType. - Parse object and function member pointers at any nesting level while preserving grouped-declarator precedence. - Document the parsed-model compatibility break.
- Use the broader TypeId model in aliases, template arguments, and parse_typename. - Support bare functions and complex member-pointer types consistently across type-id contexts. - Keep ordinary declarators constrained to object-compatible decorated types.
- Parse both named and abstract function declarators in parameter lists. - Apply the standard function-to-pointer adjustment to function parameters. - Treat grouped names and nested template arguments consistently so grouping does not change parameter types.
- Parse trailing returns through the complete type-id path. - Preserve wrapped function types as legal return types. - Reject bare array and function types, which cannot be returned directly.
- Centralize bounded token-stream swaps used by parser probes. - Restore pending attributes and anonymous identifiers after each probe. - Prevent speculative type-id and member-pointer parsing from leaking state into later declarations.
- Replace the separate syntax classifier with a bounded recursive declarator parse. - Use the ordinary declarator grammar to classify grouped pointer syntax without duplicating rules. - Handle nested grouping, parameter packs, and MSVC calling conventions.
1e39916 to
29b849b
Compare
This will result in cxxheaderparser 2.x