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
Conversation
…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); |
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.
Should return nullptr
here too?
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 worried that doing so would elicit needless error messages in the following code.
Tim, any remaining concern? |
Nope, just forgot to hit Approve. |
…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
Original-commit: flang-compiler/f18@9f918c2 Reviewed-on: flang-compiler/f18#737
…/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
…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
Original-commit: flang-compiler/f18@9f918c2 Reviewed-on: flang-compiler/f18#737
…fiers. Check for USE of m in m.