We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4903441 commit fd461feCopy full SHA for fd461fe
llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
@@ -51,14 +51,15 @@ Triple getHostTripleForAddrSize(uint8_t AddrSize) {
51
/// \returns true if there were errors, false otherwise.
52
template <typename T>
53
static bool HandleExpectedError(T &Expected) {
54
- if (!Expected)
55
- return false;
56
std::string ErrorMsg;
57
handleAllErrors(Expected.takeError(), [&](const llvm::ErrorInfoBase &EI) {
58
ErrorMsg = EI.message();
59
});
60
- ::testing::AssertionFailure() << "error: " << ErrorMsg;
61
- return true;
+ if (!ErrorMsg.empty()) {
+ ::testing::AssertionFailure() << "error: " << ErrorMsg;
+ return true;
+ }
62
+ return false;
63
}
64
65
template <uint16_t Version, class AddrType, class RefAddrType>
0 commit comments