[flang-commits] [flang] [Flang][OpenMP] Fix DEFAULT(NONE) check for Cray pointers in nested OpenMP directives (PR #190764)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Mon Apr 13 06:27:03 PDT 2026
================
@@ -2494,20 +2692,24 @@ void OmpAttributeVisitor::CreateImplicitSymbols(
Symbol::Flags dsa;
Scope &scope{context_.FindScope(dirContext.directiveSource)};
- auto it{scope.find(symbol->name())};
- if (it != scope.end()) {
- // There is already a symbol in the current scope, use its DSA.
- dsa = GetSymbolDSA(*it->second);
- } else {
- for (auto symMap : dirContext.objectWithDSA) {
- if (symMap.first->name() == symbol->name()) {
- // `symbol` already has a data-sharing attribute in the current
- // context, use it.
- dsa.set(symMap.second);
- break;
+
+ auto initSymbolDSA = [&](const Symbol *symbol, Symbol::Flags &dsa) {
----------------
eugeneepshteyn wrote:
Suggestion: rename `symbol` to `sym` to make it very clear that we are not using the outer scope `symbol` in this lambda function.
https://github.com/llvm/llvm-project/pull/190764
More information about the flang-commits
mailing list