[flang-commits] [flang] Fix semantic check for default declare mappers (PR #139593)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Wed May 14 02:44:58 PDT 2025
================
@@ -1783,6 +1776,18 @@ void OmpVisitor::ProcessMapperSpecifier(const parser::OmpMapperSpecifier &spec,
Walk(clauses);
EndDeclTypeSpec();
PopScope();
+
+ if (auto &mapperName{std::get<std::optional<parser::Name>>(spec.t)}) {
+ mapperName->symbol =
+ &MakeSymbol(*mapperName, MiscDetails{MiscDetails::Kind::ConstructName});
+ } else {
+ const auto &type = std::get<parser::TypeSpec>(spec.t);
+ static llvm::SmallVector<std::string> defaultNames;
----------------
tblah wrote:
Surely some string storage for symbol names already exists? If not then I agree that it would be better to have a utility for other situations like this. Even just wrapping the static vector in a well documented and named utility function would make it clearer what this is for.
https://github.com/llvm/llvm-project/pull/139593
More information about the flang-commits
mailing list