Skip to content
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

[tcling] Disable runtime resolution for identifiers that are certainly types #9160

Merged
merged 1 commit into from
Oct 27, 2021

Conversation

jalopezg-git
Copy link
Collaborator

@jalopezg-git jalopezg-git commented Oct 21, 2021

Given two consecutive identifiers, the first token is necessarily a type name, e.g. in foo bar, foo is a type. This pull-request disables runtime resolution for this case.

Previously, the lookup was returning a VarDecl of type DependentTy regardless of the identifier being probably a mistyped type. This caused clang to start parsing an expression, which ended up in misleading diagnostic messages.

More details here: https://sft.its.cern.ch/jira/browse/ROOT-5268

Sibling PR in roottest: root-project/roottest#786.

Changes or fixes:

  • Disable runtime resolution for identifiers that are followed by an identifier token.

Checklist:

  • tested changes locally

This PR fixes JIRA issue ROOT-5268.

Given two consecutive identifiers, the first token is necessarily a type name,
e.g. in `foo bar`, `foo` is certainly a type.  In this case, runtime resolution
must be disabled.
More details here: https://sft.its.cern.ch/jira/browse/ROOT-5268

Closes JIRA issue ROOT-5268.
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-10-21T15:24:57.384Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1084 (message):

@phsft-bot
Copy link
Collaborator

Build failed on mac11.0/cxx17.
Running on macphsft23.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on mac1014/python3.
Running on macitois21.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@jalopezg-git
Copy link
Collaborator Author

@phsft-bot build just on mac1014/python3

@phsft-bot
Copy link
Collaborator

Starting build on mac1014/python3
How to customize builds

Copy link
Member

@Axel-Naumann Axel-Naumann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

Copy link
Member

@hahnjo hahnjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clever solution 😃

@jalopezg-git jalopezg-git merged commit 716732c into root-project:master Oct 27, 2021
@jalopezg-git jalopezg-git deleted the cling-fix-ROOT5268 branch October 27, 2021 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants