Commit dad85ba
Remove getMapBuffer() from placeholder StateData (#57213)
Summary:
Pull Request resolved: #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: 71e767bb19dce5b6097d49654b3701896a783f5b1 parent d26f7b3 commit dad85ba
4 files changed
Lines changed: 4 additions & 7 deletions
File tree
- packages/react-native/ReactCommon/react/renderer/core
- scripts/cxx-api/api-snapshots
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| |||
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
30 | | - | |
31 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7933 | 7933 | | |
7934 | 7934 | | |
7935 | 7935 | | |
7936 | | - | |
7937 | 7936 | | |
7938 | 7937 | | |
7939 | 7938 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7697 | 7697 | | |
7698 | 7698 | | |
7699 | 7699 | | |
7700 | | - | |
7701 | 7700 | | |
7702 | 7701 | | |
7703 | 7702 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7924 | 7924 | | |
7925 | 7925 | | |
7926 | 7926 | | |
7927 | | - | |
7928 | 7927 | | |
7929 | 7928 | | |
7930 | 7929 | | |
| |||
0 commit comments