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

Avoid interference between different construct association in name resolutions #600

Merged
merged 2 commits into from Jul 24, 2019

Conversation

jeanPerier
Copy link
Collaborator

Fix #598 and similar issues.
Transform resolve-names.cc ConstructVisitor association_ member into a stack so that different association construct (select-type, select-rank, change-team, associate) imbrication/succession do not interfere with each other leading to erroneous symbol resolution.

Fix issue 598 and related issues.

Transform resolve-names.cc ConstructVisitor association_ member into a
stack so that different association construct (select-type, select-rank,
change-team, associate) imbrication/succession do not interfere with each
other leading to wrong erronous symbol resolution.
Copy link
Collaborator

@klausler klausler left a comment

Choose a reason for hiding this comment

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

Good job figuring this out!

@@ -4407,6 +4440,20 @@ ConstructVisitor::Selector ConstructVisitor::ResolveSelector(
x.u);
}

ConstructVisitor::Association &ConstructVisitor::GetCurrentAssociation() {
CHECK(associationStack_.size());
Copy link
Collaborator

Choose a reason for hiding this comment

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

!associationStack_.empty() makes the condition clearer. Also below.

Copy link
Collaborator

@tskeith tskeith left a comment

Choose a reason for hiding this comment

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

Looks good

@jeanPerier jeanPerier merged commit 28c32a7 into master Jul 24, 2019
@jeanPerier jeanPerier deleted the jpr-fix-598 branch July 24, 2019 09:40
swift-ci pushed a commit to apple/llvm-project that referenced this pull request Apr 9, 2020
…oltions

Fix issue 598 and related issues.

Transform resolve-names.cc ConstructVisitor association_ member into a
stack so that different association construct (select-type, select-rank,
change-team, associate) imbrication/succession do not interfere with each
other leading to wrong erronous symbol resolution.

Original-commit: flang-compiler/f18@5781f29
Reviewed-on: flang-compiler/f18#600
Tree-same-pre-rewrite: false
swift-ci pushed a commit to apple/llvm-project that referenced this pull request Apr 9, 2020
swift-ci pushed a commit to apple/llvm-project that referenced this pull request Apr 9, 2020
…/jpr-fix-598

Avoid interference between different construct association in name resolutions

Original-commit: flang-compiler/f18@28c32a7
Reviewed-on: flang-compiler/f18#600
mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this pull request Oct 7, 2022
…oltions

Fix issue 598 and related issues.

Transform resolve-names.cc ConstructVisitor association_ member into a
stack so that different association construct (select-type, select-rank,
change-team, associate) imbrication/succession do not interfere with each
other leading to wrong erronous symbol resolution.

Original-commit: flang-compiler/f18@5781f29
Reviewed-on: flang-compiler/f18#600
Tree-same-pre-rewrite: false
mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this pull request Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants