diff --git a/packages/react-native/.doxygen.config.template b/packages/react-native/.doxygen.config.template index f06eeddd9b57..03e2e697a524 100644 --- a/packages/react-native/.doxygen.config.template +++ b/packages/react-native/.doxygen.config.template @@ -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 diff --git a/scripts/cxx-api/manual_test/.doxygen.config.template b/scripts/cxx-api/manual_test/.doxygen.config.template index c8e1f2a82f02..4e46ff45e8aa 100644 --- a/scripts/cxx-api/manual_test/.doxygen.config.template +++ b/scripts/cxx-api/manual_test/.doxygen.config.template @@ -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 diff --git a/scripts/cxx-api/parser/builders.py b/scripts/cxx-api/parser/builders.py index f217e594d2ea..862c91eaaf6d 100644 --- a/scripts/cxx-api/parser/builders.py +++ b/scripts/cxx-api/parser/builders.py @@ -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 @@ -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 + ) + ): + typedef_keyword = "using" + else: + typedef_keyword = "typedef" typedef = TypedefMember( typedef_name, @@ -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 diff --git a/scripts/cxx-api/parser/snapshot.py b/scripts/cxx-api/parser/snapshot.py index eca55a0bcb29..2e854f3ac824 100644 --- a/scripts/cxx-api/parser/snapshot.py +++ b/scripts/cxx-api/parser/snapshot.py @@ -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}" diff --git a/scripts/cxx-api/tests/snapshots/.doxygen.config.template b/scripts/cxx-api/tests/snapshots/.doxygen.config.template index 00ae22eb9d26..057e757e174d 100644 --- a/scripts/cxx-api/tests/snapshots/.doxygen.config.template +++ b/scripts/cxx-api/tests/snapshots/.doxygen.config.template @@ -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