Files
react-native/scripts
Nathan Lanza dad85ba617 Remove getMapBuffer() from placeholder StateData (#57213)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57213

`StateData` is the placeholder data type for shadow nodes that have no state. It declared `getMapBuffer()` but never defined it, which breaks the build under clang-22.

`ConcreteState<DataT>::getMapBuffer()` calls `getData().getMapBuffer()` only when the `StateDataWithMapBuffer` concept is satisfied, and otherwise returns `MapBufferBuilder::EMPTY()`. Because `StateData` declared `getMapBuffer()`, it satisfied the concept, so `ConcreteState<StateData>::getMapBuffer()` referenced the undefined `StateData::getMapBuffer()`. Whether a class template's virtual members are implicitly instantiated is unspecified ([temp.inst]/11); clang-22 instantiates this override, turning the missing definition into an undefined-symbol link error.

Remove `getMapBuffer()` from `StateData` so the concept is no longer satisfied and the `EMPTY()` fallback is used — the same way `getJNIReference()` is already handled for this placeholder type. `getDynamic()` stays, since `ConcreteState` calls it unconditionally.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D95506209

fbshipit-source-id: 71e767bb19dce5b6097d49654b3701896a783f5b
2026-06-15 19:06:49 -07:00
..