[flang-commits] [flang] [flang][CLI] Have the CLI hint the flag to disable a warning (PR #144767)

Andre Kuhlenschmidt via flang-commits flang-commits at lists.llvm.org
Wed Jun 25 11:37:02 PDT 2025


================
@@ -57,17 +57,17 @@ LanguageFeatureControl::LanguageFeatureControl() {
   ForEachLanguageFeature([&](auto feature) {
     std::string_view name{Fortran::common::EnumToString(feature)};
     std::string cliOption{details::CamelCaseToLowerCaseHyphenated(name)};
-    cliOptions_.insert({cliOption, {feature}});
+    cliOptions_.insert({std::string{cliOption}, {feature}});
     languageFeatureCliCanonicalSpelling_[EnumToInt(feature)] =
-        std::string_view{cliOption};
+        std::move(cliOption);
   });
 
   ForEachUsageWarning([&](auto warning) {
     std::string_view name{Fortran::common::EnumToString(warning)};
     std::string cliOption{details::CamelCaseToLowerCaseHyphenated(name)};
-    cliOptions_.insert({cliOption, {warning}});
+    cliOptions_.insert({std::string{cliOption}, {warning}});
----------------
akuhlens wrote:

I didn't, I was debugging and it got left in.

https://github.com/llvm/llvm-project/pull/144767


More information about the flang-commits mailing list