[flang-commits] [flang] [flang] Add missing symbol names to the error message (PR #148888)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Tue Jul 15 09:50:37 PDT 2025
https://github.com/eugeneepshteyn created https://github.com/llvm/llvm-project/pull/148888
Fixes #140485
>From bc9dbac2f7adf031873f627060be11c557c0b881 Mon Sep 17 00:00:00 2001
From: Eugene Epshteyn <eepshteyn at nvidia.com>
Date: Tue, 15 Jul 2025 12:41:34 -0400
Subject: [PATCH] [flang] Add missing symbol names to the error message
Fixes #140485
---
flang/lib/Semantics/resolve-names.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp
index 96faa5fd954cd..b3268605e7c0c 100644
--- a/flang/lib/Semantics/resolve-names.cpp
+++ b/flang/lib/Semantics/resolve-names.cpp
@@ -8574,8 +8574,10 @@ bool ResolveNamesVisitor::Pre(const parser::ImportStmt &x) {
} else {
Say(name,
"A distinct '%s' is already present in this scope"_err_en_US)
- .Attach(symbol->name(), "Previous declaration of '%s'"_en_US)
- .Attach(outer->name(), "Declaration of '%s' in host scope"_en_US);
+ .Attach(symbol->name(), "Previous declaration of '%s'"_en_US,
+ symbol->name().ToString())
+ .Attach(outer->name(), "Declaration of '%s' in host scope"_en_US,
+ outer->name().ToString());
}
}
} else {
More information about the flang-commits
mailing list