[flang-commits] [flang] [flang][cli] Add diagnostic flags to the CLI (PR #142022)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Thu May 29 20:22:27 PDT 2025
================
@@ -127,6 +130,24 @@ class LanguageFeatureControl {
bool warnAllLanguage_{false};
UsageWarnings warnUsage_;
bool warnAllUsage_{false};
+ bool disableAllWarnings_{false};
};
+
+// Parse a CLI enum option return the enum index and whether it should be
+// enabled (true) or disabled (false). Just exposed for the template below.
+std::optional<std::pair<bool, int>> parseCLIEnumIndex(
+ llvm::StringRef input, std::function<std::optional<int>(Predicate)> find);
+
+template <typename ENUM>
+std::optional<std::pair<bool, ENUM>> parseCLIEnum(
+ llvm::StringRef input, std::function<std::optional<int>(Predicate)> find) {
----------------
eugeneepshteyn wrote:
`std::string_view` would probably work just as well here.
https://github.com/llvm/llvm-project/pull/142022
More information about the flang-commits
mailing list