diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2015-12-15 01:33:19 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2015-12-15 01:33:19 +0000 |
commit | e65b2cf2975891b83ecbfdc1d92fb89f248129e2 (patch) | |
tree | 02fb044f608cd6da5c3728fd235cc39c304723e0 /lldb/source/Target/ThreadPlanStepOverRange.cpp | |
parent | 162b68d86f36bcb19875d0e83cadecd86380abeb (diff) | |
download | bcm5719-llvm-e65b2cf2975891b83ecbfdc1d92fb89f248129e2.tar.gz bcm5719-llvm-e65b2cf2975891b83ecbfdc1d92fb89f248129e2.zip |
Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/.
Simplify smart pointers checks in conditions. Other minor fixes.
llvm-svn: 255598
Diffstat (limited to 'lldb/source/Target/ThreadPlanStepOverRange.cpp')
-rw-r--r-- | lldb/source/Target/ThreadPlanStepOverRange.cpp | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/lldb/source/Target/ThreadPlanStepOverRange.cpp b/lldb/source/Target/ThreadPlanStepOverRange.cpp index 6e7ee57fc82..08655be2439 100644 --- a/lldb/source/Target/ThreadPlanStepOverRange.cpp +++ b/lldb/source/Target/ThreadPlanStepOverRange.cpp @@ -7,12 +7,11 @@ // //===----------------------------------------------------------------------===// -#include "lldb/Target/ThreadPlanStepOverRange.h" - // C Includes // C++ Includes // Other libraries and framework includes // Project includes +#include "lldb/Target/ThreadPlanStepOverRange.h" #include "lldb/Core/Log.h" #include "lldb/Core/Stream.h" #include "lldb/Symbol/Block.h" @@ -52,9 +51,7 @@ ThreadPlanStepOverRange::ThreadPlanStepOverRange SetupAvoidNoDebug(step_out_avoids_code_without_debug_info); } -ThreadPlanStepOverRange::~ThreadPlanStepOverRange () -{ -} +ThreadPlanStepOverRange::~ThreadPlanStepOverRange() = default; void ThreadPlanStepOverRange::GetDescription (Stream *s, lldb::DescriptionLevel level) @@ -111,7 +108,6 @@ ThreadPlanStepOverRange::SetupAvoidNoDebug(LazyBool step_out_avoids_code_without bool ThreadPlanStepOverRange::IsEquivalentContext(const SymbolContext &context) { - // Match as much as is specified in the m_addr_context: // This is a fairly loose sanity check. Note, sometimes the target doesn't get filled // in so I left out the target check. And sometimes the module comes in as the .o file from the @@ -150,14 +146,8 @@ ThreadPlanStepOverRange::ShouldStop (Event *event_ptr) // If we're out of the range but in the same frame or in our caller's frame // then we should stop. // When stepping out we only stop others if we are forcing running one thread. - bool stop_others; - if (m_stop_others == lldb::eOnlyThisThread) - stop_others = true; - else - stop_others = false; - + bool stop_others = (m_stop_others == lldb::eOnlyThisThread); ThreadPlanSP new_plan_sp; - FrameComparison frame_order = CompareCurrentFrameToStartFrame(); if (frame_order == eFrameCompareOlder) @@ -189,13 +179,13 @@ ThreadPlanStepOverRange::ShouldStop (Event *event_ptr) const SymbolContext &older_context = older_frame_sp->GetSymbolContext(eSymbolContextEverything); if (IsEquivalentContext(older_context)) { - new_plan_sp = m_thread.QueueThreadPlanForStepOutNoShouldStop (false, - NULL, - true, - stop_others, - eVoteNo, - eVoteNoOpinion, - 0); + new_plan_sp = m_thread.QueueThreadPlanForStepOutNoShouldStop(false, + nullptr, + true, + stop_others, + eVoteNo, + eVoteNoOpinion, + 0); break; } else @@ -216,7 +206,6 @@ ThreadPlanStepOverRange::ShouldStop (Event *event_ptr) return false; } - if (!InSymbol()) { // This one is a little tricky. Sometimes we may be in a stub or something similar, @@ -283,7 +272,6 @@ ThreadPlanStepOverRange::ShouldStop (Event *event_ptr) step_past_remaining_inline = true; } - } } } @@ -378,10 +366,7 @@ ThreadPlanStepOverRange::DoPlanExplainsStop (Event *event_ptr) } else if (reason == eStopReasonBreakpoint) { - if (NextRangeBreakpointExplainsStop(stop_info_sp)) - return_value = true; - else - return_value = false; + return_value = NextRangeBreakpointExplainsStop(stop_info_sp); } else { @@ -446,4 +431,3 @@ ThreadPlanStepOverRange::DoWillResume (lldb::StateType resume_state, bool curren return true; } - |