[flang-commits] [flang] [flang] Improve warnings for invalid arguments when folding host runtime (PR #96807)
Pete Steinfeld via flang-commits
flang-commits at lists.llvm.org
Fri Jun 28 13:55:44 PDT 2024
================
@@ -633,10 +633,243 @@ static DynamicType BiggerType(DynamicType type) {
return type;
}
+/// Structure to register intrinsic argument checks that must be performed.
+using ArgumentVerifierFunc = bool (*)(
+ const std::vector<Expr<SomeType>> &, FoldingContext &);
+struct ArgumentVerifier {
+ using Key = std::string_view;
+ // Needed for implicit compare with keys.
+ constexpr operator Key() const { return key; }
+ Key key; // intrinsic name
----------------
psteinfeld wrote:
`struct ArgumentVerifier` is later used as an argument to the template "StaticMultimapView`, which requires that the member be named `key`.
https://github.com/llvm/llvm-project/pull/96807
More information about the flang-commits
mailing list