>> + M = std::move(*MOrErr); > > It's probably better to leave the `if (hasError()) return 1` path in > here, just to future proof against changes to the diagnosticHandler. > The operator* of ErrorOr has an assert, so this is pretty future proof. Cheers, Rafael