MCPcopy Create free account
hub / github.com/ablab/spades / errorToBool

Function errorToBool

ext/include/llvm/Support/Error.h:1024–1029  ·  view source on GitHub ↗

Helper for converting an Error to a bool. This method returns true if Err is in an error state, or false if it is in a success state. Puts Err in a checked state in both cases (unlike Error::operator bool(), which only does this for success states).

Source from the content-addressed store, hash-verified

1022/// in a success state. Puts Err in a checked state in both cases (unlike
1023/// Error::operator bool(), which only does this for success states).
1024inline bool errorToBool(Error Err) {
1025 bool IsError = static_cast<bool>(Err);
1026 if (IsError)
1027 consumeError(std::move(Err));
1028 return IsError;
1029}
1030
1031/// Helper for Errors used as out-parameters.
1032///

Callers 1

getAsDoubleMethod · 0.85

Calls 1

consumeErrorFunction · 0.85

Tested by

no test coverage detected