-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SR-14069] Symbol not in TBD file when initializing a static member variable with an inline function #56458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@swift-ci create |
Comment by Puyan Lotfi (JIRA) I've added the repro steps to a branch here: https://github.com/plotfi/cxx-interop-test/tree/tbd-SR-14069 |
Comment by Puyan Lotfi (JIRA) I think in SwiftDeclConverter::VisitVarDecl in ImportDecl.cpp we may want to record somewhere that the var_decl isStatic. Later in swift::validateTBD we can know that specific externally visible symbol encountered in validateSymbols() in TBD.cpp comes from an inline definition or a static class variable definition. The cause of the verifier error here is that Incrementor::incrementee is not being added to the symbols list passed to validateSymbols because the TBDGenVisitor::visitFile does not encounter it as a top level Decl. |
Initially it was unrelated to C++, but #40414 did fix a small bug in which the TBD validation was performed more than needed and was surfacing some of these errors incorrectly (in the case of that PR, when optimizations were enabled, but also |
This disables TBD validation when C++ interop is enabled, unless an explicit `-validate-tbd-against-ir=` flag was passed. rdar://83405989 / #56458
This disables TBD validation when C++ interop is enabled, unless an explicit `-validate-tbd-against-ir=` flag was passed. rdar://83405989 / #56458
This disables TBD validation when C++ interop is enabled, unless an explicit `-validate-tbd-against-ir=` flag was passed. rdar://83405989 / #56458
Additional Detail from JIRA
md5: 0bf3fb4aec12d9cfe2a92ea0cc046d58
Issue Description:
When using the
initializeStaticVar()
function from Swift, we get an error:The issue arises when using an inline function to initialize the static member variable.
The text was updated successfully, but these errors were encountered: