Skip to content

Commit

Permalink
Use explict has_value API
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Aug 19, 2024
1 parent 16a73e2 commit 4983073
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Dialect/OM/Transforms/VerifyObjectFields.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void VerifyObjectFieldsPass::runOnOperation() {
std::optional<Type> fieldTypeOpt =
classDef.getFieldsOp().getFieldType(field.getAttr());

if (!fieldTypeOpt) {
if (!fieldTypeOpt.has_value()) {
auto error =
objectField.emitOpError("referenced non-existent field ")
<< field;
Expand Down

0 comments on commit 4983073

Please sign in to comment.