[clang] [CIR][NFC] Fix regression in clang/test/CIR/IR/func.cir (PR #188069)
Sirui Mu via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 24 05:51:35 PDT 2026
================
@@ -2215,17 +2215,21 @@ ParseResult cir::FuncOp::parse(OpAsmParser &parser, OperationState &state) {
// Parse CXXSpecialMember attribute
if (parser.parseOptionalKeyword("special_member").succeeded()) {
- cir::CXXCtorAttr ctorAttr;
- cir::CXXDtorAttr dtorAttr;
- cir::CXXAssignAttr assignAttr;
if (parser.parseLess().failed())
return failure();
- if (parser.parseOptionalAttribute(ctorAttr).has_value())
- state.addAttribute(specialMemberAttr, ctorAttr);
- else if (parser.parseOptionalAttribute(dtorAttr).has_value())
- state.addAttribute(specialMemberAttr, dtorAttr);
- else if (parser.parseOptionalAttribute(assignAttr).has_value())
- state.addAttribute(specialMemberAttr, assignAttr);
+
+ mlir::Attribute attr;
+ mlir::OptionalParseResult parseResult = parser.parseOptionalAttribute(attr);
----------------
Lancern wrote:
Yep, thanks for catching this. This attribute is indeed mandatory at this point.
https://github.com/llvm/llvm-project/pull/188069
More information about the cfe-commits
mailing list