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

Allow module, submodule, and program names to be used as local identi… #737

Merged
merged 2 commits into from Sep 11, 2019

Conversation

klausler
Copy link
Collaborator

…fiers. Check for USE of m in m.

if (!scope) {
return nullptr;
}
if (scope->kind() != Scope::Kind::Module) {
Say(name, "'%s' is not a module"_err_en_US);
return nullptr;
}
if (DoesScopeContain(scope, currScope())) {
Say(name, "Module '%s' cannot USE itself."_err_en_US);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should return nullptr here too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I worried that doing so would elicit needless error messages in the following code.

@klausler
Copy link
Collaborator Author

Tim, any remaining concern?

@tskeith
Copy link
Collaborator

tskeith commented Sep 11, 2019

Tim, any remaining concern?

Nope, just forgot to hit Approve.

@klausler klausler merged commit ffc90d0 into master Sep 11, 2019
@klausler klausler deleted the pmk-m-in-m branch September 11, 2019 23:40
swift-ci pushed a commit to apple/llvm-project that referenced this pull request Apr 9, 2020
…l identifiers. Check for USE of m in m.

Original-commit: flang-compiler/f18@9abfd9e
Reviewed-on: flang-compiler/f18#737
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
…/pmk-m-in-m

Allow module, submodule, and program names to be used as local identi…

Original-commit: flang-compiler/f18@ffc90d0
Reviewed-on: flang-compiler/f18#737
mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this pull request Oct 7, 2022
…l identifiers. Check for USE of m in m.

Original-commit: flang-compiler/f18@9abfd9e
Reviewed-on: flang-compiler/f18#737
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