Implementing the APFloat part in PR4745.
This is an invalid assert.
lib/Support/StringRef.cpp:593:12: warning: implicit conversion turns string literal into bool: 'const char ' to 'bool' [-Wstring-conversion]
I'm pretty certain this won't do what you want in an asserts build (technically a build with LLVM_ENABLE_ABI_BREAKING_CHECKS). The destructor of an llvm::Expected asserts that the Expected was checked, and evaluating an Expected as a boolean only counts as checking it if there wasn't an error, in the error case, you'll hit an assert failure instead of doing the return. You'll need to capture the Expected and then do something like consumeError(expected.takeError()) to discard the error and avoid the assertion.