summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-07-07 21:02:59 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-07-07 21:02:59 +0000
commit94b98b2cafad761a9c2e4fd09d7c04fd8948f2d9 (patch)
tree4ce6ee9b2ea0f184eab76d435a4dccc0650d4168 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent64c46574b0adc5aece427650a0b950a3eb3e166e (diff)
ProfData: Fix some unchecked Errors in unit tests
The 'NoError' function was meant to be used as the input to ASSERT/EXPECT_TRUE, but it is easy to forget this (it could be annotated with nodiscard to help this) so many sites that look like they're checked are not (& silently discard the failure). Only one site actually has an Error sneaking out this way and I've replaced that one with a FIXME+consumeError. The rest of the code has been modified to use the EXPECT_THAT_ERROR macros Zach introduced a while back. Between the options available this seems OK/good/something to standardize on - though it's difficult to build a matcher that could handle checking for a specific llvm::Error result, so those remain using the custom ErrorEquals (& the nodiscard added to ensure it is not misused as it was previous to this patch). It could still be generalized a bit further (even not as far as a matcher, but at least support multiple kinds of Error, etc) & added to the general Error utility header. llvm-svn: 307440
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions