================
@@ -301,6 +301,50 @@ DataMemberAttr::verify(function_ref<InFlightDiagnostic()>
emitError,
return success();
}
+//===----------------------------------------------------------------------===//
+// MethodAttr definitions
+//===----------------------------------------------------------------------===//
+
+Attribute MethodAttr::parse(AsmParser &parser, Type odsType) {
+ auto ty = mlir::cast<cir::MethodType>(odsType);
+
+ if (parser.parseLess().failed())
+ return {};
+
+ // Try to parse the null pointer constant.
+ if (parser.parseOptionalKeyword("null").succeeded()) {
+ if (parser.parseGreater())
+ return {};
+ return get(ty);
+ }
+
+ // Try to parse a flat symbol ref for a pointer to non-virtual member
+ // function.
+ FlatSymbolRefAttr symbol;
+ auto parseSymbolRefResult = parser.parseOptionalAttribute(symbol);
----------------
erichkeane wrote:
what should be here instead of auto?
https://github.com/llvm/llvm-project/pull/174640
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits