[clang] [CIR] Upstream CIR method attribute handling (PR #174640)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 6 12:37:01 PST 2026
================
@@ -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())
----------------
erichkeane wrote:
should this be `parser.parseGreater.failed()` ? Like we do above?
https://github.com/llvm/llvm-project/pull/174640
More information about the cfe-commits
mailing list