-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[cxxmodules] Do not use FindObject when we have the Decl*. #1416
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
[cxxmodules] Do not use FindObject when we have the Decl*. #1416
Conversation
04a9e3a to
37a7dde
Compare
|
@phsft-bot build! |
|
Starting build on |
|
Build failed on mac1012/native. Errors:
|
37a7dde to
92effbb
Compare
|
Starting build on |
|
Build failed on centos7/gcc49. Failing tests: |
|
Build failed on slc6/gcc49. Failing tests: |
|
Build failed on slc6/gcc62. Failing tests: |
|
Build failed on slc6/gcc62. Failing tests: |
|
Build failed on mac1012/native. Failing tests: |
|
Build failed on ubuntu14/native. Failing tests: |
|
Build failed on ubuntu14/native. Failing tests: |
Axel-Naumann
left a comment
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.
👍 Thanks, Vassil!
core/metacling/src/TCling.cxx
Outdated
| const VarDecl *CanonVD = cast<VarDecl>(ND)->getCanonicalDecl(); | ||
| // Skip if already in the list. | ||
| if (gROOT->GetListOfGlobals()->FindObject(ND->getNameAsString().c_str())) | ||
| if (ListOfGlobals->Find(static_cast<DeclId_t>(CanonVD))) |
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.
Would be it be better as a const_cast and/or an update to TListOfDataMembers::Find to take a const decl?
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.
I am not sure I understand the const_cast comment. I agree we may want to update TListOfDataMembers::Find as a next step in improving this code.
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.
My bad. I misread the line number in the error messages.
|
The behavior shown in the failing test is not what we need, because the old Do you want to update the old |
|
Starting build on |
|
Build failed on centos7/gcc49. |
|
Build failed on ubuntu14/native. |
|
Build failed on mac1012/native. |
|
Build failed on slc6/gcc62. |
|
Build failed on slc6/gcc49. |
|
Build failed on slc6/gcc62. |
|
Build failed on windows10/vc15. |
|
Build failed on ubuntu14/native. |
70b969f to
906efa4
Compare
|
Starting build on |
|
Build failed on ubuntu14/native. Failing tests: |
|
@phsft-bot build! |
|
Starting build on |
|
Build failed on slc6/gcc49. Errors:
And 9 more |
|
Build failed on mac1013/native. Failing tests: |
|
Build failed on ubuntu16/native. Failing tests: |
TClingClassInfo has a constructor that is supposed to be used for TU scope lookups. However, it iterates over decls and causes lots of deserializations. It does not respect the C++ lookup rules because it returns the first decl with the name it finds. This patch tries to keep the original behavior by first trying to do a regular lookup and if the result is unambigious it returns the found decl. If the result was ambiguous we try to disambiguate it (by turning off the using directives) and return the found result.
906efa4 to
307adf2
Compare
|
Starting build on |
Prevent the following error when ROOT has been built without PyROOT:
```
test 1416
Start 1416: roottest-root-meta-enumPayloadManipulation-checkEnumFwdDecl
1416: Test command: "C:\Program Files\CMake\bin\cmake.exe" "-DCMD=C:/Users/bellenot/AppData/Local/Continuum/miniconda3/python.exe^C:/Users/bellenot/git/roottest/root/meta/enumPayloadManipulation/checkEnumFwdDecl.py^--fixcling" "-DOUT=C:/Users/bellenot/build/x64/release/roottest/root/meta/enumPayloadManipulation/checkEnumFwdDecl.log" "-DOUTREF=C:/Users/bellenot/git/roottest/root/meta/enumPayloadManipulation/empty.ref" "-DERRREF=C:/Users/bellenot/git/roottest/root/meta/enumPayloadManipulation/empty.ref" "-DERR=C:/Users/bellenot/build/x64/release/roottest/root/meta/enumPayloadManipulation/checkEnumFwdDecl.err" "-DCWD=C:/Users/bellenot/build/x64/release/roottest/root/meta/enumPayloadManipulation" "-DDIFFCMD=C:/Users/bellenot/AppData/Local/Continuum/miniconda3/python.exe^C:/Users/bellenot/git/roottest/scripts/custom_diff.py" "-DCHECKOUT=true" "-DCHECKERR=true" "-DSYS=C:/Users/bellenot/build/x64/release" "-DENV=ROOTSYS=C:/Users/bellenot/build/x64/release#PYTHONPATH=C:/Users/bellenot/build/x64/release/bin" "-P" "C:/Users/bellenot/build/x64/release/RootTestDriver.cmake"
1416: Environment variables:
1416: ROOT_HIST=0
1416: Test timeout computed to be: 300
1416: -- TEST COMMAND --
1416: cd C:/Users/bellenot/build/x64/release/roottest/root/meta/enumPayloadManipulation
1416: C:/Users/bellenot/AppData/Local/Continuum/miniconda3/python.exe C:/Users/bellenot/git/roottest/root/meta/enumPayloadManipulation/checkEnumFwdDecl.py --fixcling
1416: -- BEGIN TEST OUTPUT --
1416:
1416: -- END TEST OUTPUT --
1416: -- BEGIN TEST ERROR --
1416: Traceback (most recent call last):
1416: File "C:/Users/bellenot/git/roottest/root/meta/enumPayloadManipulation/checkEnumFwdDecl.py", line 1, in <module>
1416: import ROOT
1416: ModuleNotFoundError: No module named 'ROOT'
1416:
1416: -- END TEST ERROR --
1416: CMake Error at C:/Users/bellenot/build/x64/release/RootTestDriver.cmake:181 (message):
1416: got exit code 1 but expected 0
1416:
1416:
3/3 Test root-project#1416: roottest-root-meta-enumPayloadManipulation-checkEnumFwdDecl .....................***Failed 0.14 sec
```
No description provided.