-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[v628][cling] DeclUnloader: fix unloading of member functions of templated classes #13618
[v628][cling] DeclUnloader: fix unloading of member functions of templated classes #13618
Conversation
Starting build on |
Build failed on ROOT-ubuntu2204/nortcxxmod. |
Build failed on mac11/noimt. Failing tests: |
Build failed on mac12arm/cxx20. Warnings:
And 113 more Failing tests: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to make it explicit: this is causing failures of stressInterpreter
on macOS and must not be merged for now.
That's true; I'll have to check how to fix this... Currently, it seems non-trivial: we probably need to judge whether to unload a declaration or not by looking at the whole chain of (implicit) instantiations 🤷♂️. |
Unsure as to whether backporting to v6.28 is still needed. Feel free to close the PR otherwise 🙂. |
I think we want to backport, I will take care of updating the PR in the next days. Also, we definitely want a backport to v6.30, also to come in the next days. |
…nning Cherry-picked from fa2cacb.
Cherry-picked from 94c5c9e.
StaticVarCollector recursively visited descendants of a `FunctionDecl` node to collect static local variables. However, these always appear in the enclosing DeclContext. (cherry picked from commit bd28a5b)
The body of member functions of a templated class only gets instantiated when the function is used. These `CXXMethodDecl` should not be deleted from the AST; instead return them to the 'instantiation pending' state. (cherry picked from commit afba1d7)
This effectively reverts commit 74472ca ("[cling] Fixes issue in DeclUnloader: do not unload templates intantiated in the PCH"), it's not needed anymore, all tests pass and the snippet in the summary of root-project#4447 works, but it filters too many declarations from the unloader. (cherry picked from commit 1c3ea0a)
8d506b8
to
f5d4a18
Compare
Starting build on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All green now 😃
This pull request is a backport of PR #13534 (a NFC; makes the code more readable) and PR #13565 (actual fix for unloading member functions of templated classes).
The aforementioned PRs have been reviewed separately.
Changes or fixes:
For the actual list of changes, see
DeclUnloader
#13534Checklist:
This PR fixes #10049, #6439, #7970, ROOT-10848 and ROOT-8084 and (hopefully also ROOT-8245).