Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-native/.doxygen.config.template
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ INTERNAL_DOCS = NO
# Possible values are: SYSTEM, NO and YES.
# The default value is: SYSTEM.

CASE_SENSE_NAMES = SYSTEM
CASE_SENSE_NAMES = YES

# If the HIDE_SCOPE_NAMES tag is set to NO then Doxygen will show members with
# their full class and namespace scopes in the documentation. If set to YES, the
Expand Down
2 changes: 1 addition & 1 deletion scripts/cxx-api/manual_test/.doxygen.config.template
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ INTERNAL_DOCS = NO
# Possible values are: SYSTEM, NO and YES.
# The default value is: SYSTEM.

CASE_SENSE_NAMES = SYSTEM
CASE_SENSE_NAMES = YES

# If the HIDE_SCOPE_NAMES tag is set to NO then Doxygen will show members with
# their full class and namespace scopes in the documentation. If set to YES, the
Expand Down
25 changes: 24 additions & 1 deletion scripts/cxx-api/parser/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
TypedefMember,
VariableMember,
)
from .member.base import is_function_pointer_argstring
from .scope import InterfaceScopeKind, ProtocolScopeKind, StructLikeScopeKind
from .snapshot import Snapshot
from .template import Template
Expand Down Expand Up @@ -460,7 +461,21 @@ def get_typedef_member(

typedef_keyword = "using"
if typedef_definition.startswith("typedef"):
typedef_keyword = "typedef"
# Doxygen's "combining using relations" pass can emit hybrid definitions
# like "typedef Type Name = Type" for using-declarations on macOS, while
# Linux builds report "using Name = Type". Normalise the hybrid form for
# codegen component aliases so snapshots are stable across platforms.
if (
"=" in typedef_definition
and not is_function_pointer_argstring(typedef_argstring)
and (
"ConcreteComponentDescriptor" in typedef_definition
or "ConcreteViewShadowNode" in typedef_definition
Comment on lines +472 to +473

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of this ad hoc handling.. Is this actually happening for only these two cases? OR can we generalize the behavior somehow.

@artus9033 artus9033 Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only reproduced an edge case for these 2 cases. I've tried finding a broader approach pattern and it unfortunately modifies existing contents to use using where there used to be typedef. At least, I couldn't find a broader approach / other cases breaking the parser.

)
):
typedef_keyword = "using"
else:
typedef_keyword = "typedef"

typedef = TypedefMember(
typedef_name,
Expand Down Expand Up @@ -605,6 +620,14 @@ def create_enum_scope(snapshot: Snapshot, enum_def: compound.EnumdefType) -> Non
"""
Create an enum scope in the snapshot.
"""
path = parse_qualified_path(enum_def.qualifiedname)
parent_scope = snapshot.ensure_scope(path[0:-1])
enum_name = path[-1]
if enum_name in parent_scope.inner_scopes:
existing = parent_scope.inner_scopes[enum_name]
if existing.kind.name == "enum":
return

scope = snapshot.create_enum(enum_def.qualifiedname)
scope.kind.type = resolve_linked_text_name(enum_def.get_type())[0]
scope.location = enum_def.location.file
Expand Down
2 changes: 2 additions & 0 deletions scripts/cxx-api/parser/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ def create_enum(self, qualified_name: str) -> Scope[EnumScopeKind]:
scope = current_scope.inner_scopes[enum_name]
if scope.kind.name == "temporary":
scope.kind = EnumScopeKind()
elif scope.kind.name == "enum":
return scope
else:
raise RuntimeError(
f"Identifier {enum_name} already exists in scope {current_scope.name}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/cxx-api/tests/snapshots/.doxygen.config.template
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ INTERNAL_DOCS = NO
# Possible values are: SYSTEM, NO and YES.
# The default value is: SYSTEM.

CASE_SENSE_NAMES = SYSTEM
CASE_SENSE_NAMES = YES

# If the HIDE_SCOPE_NAMES tag is set to NO then Doxygen will show members with
# their full class and namespace scopes in the documentation. If set to YES, the
Expand Down
Loading