Remove getMapBuffer() from placeholder StateData#57213
Open
lanza wants to merge 1 commit into
Open
Conversation
Summary: `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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
StateDatais the placeholder data type for shadow nodes that have no state. It declaredgetMapBuffer()but never defined it, which breaks the build under clang-22.ConcreteState<DataT>::getMapBuffer()callsgetData().getMapBuffer()only when theStateDataWithMapBufferconcept is satisfied, and otherwise returnsMapBufferBuilder::EMPTY(). BecauseStateDatadeclaredgetMapBuffer(), it satisfied the concept, soConcreteState<StateData>::getMapBuffer()referenced the undefinedStateData::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()fromStateDataso the concept is no longer satisfied and theEMPTY()fallback is used — the same waygetJNIReference()is already handled for this placeholder type.getDynamic()stays, sinceConcreteStatecalls it unconditionally.Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D95506209