diff options
| author | Sean Callanan <scallanan@apple.com> | 2012-08-09 00:50:26 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2012-08-09 00:50:26 +0000 |
| commit | 9a028519e8e759ecd5157fa8e7bdadae6da54651 (patch) | |
| tree | 8fec32c5a99b2cff7cd3a8e150e6f6a5b2974cdb /lldb/source/Expression | |
| parent | 33baca29e53d781f3b1d2fb908079afd7da865b9 (diff) | |
| download | bcm5719-llvm-9a028519e8e759ecd5157fa8e7bdadae6da54651.tar.gz bcm5719-llvm-9a028519e8e759ecd5157fa8e7bdadae6da54651.zip | |
Removed explicit NULL checks for shared pointers
and instead made us use implicit casts to bool.
This generated a warning in C++11.
<rdar://problem/11930775>
llvm-svn: 161559
Diffstat (limited to 'lldb/source/Expression')
| -rw-r--r-- | lldb/source/Expression/ClangExpressionDeclMap.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Expression/ClangExpressionParser.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Expression/ClangFunction.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Expression/ClangUserExpression.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Expression/IRInterpreter.cpp | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index e4c5a179439..68467a708ea 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -2657,7 +2657,7 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context, err); // If we found a variable in scope, no need to pull up function names - if (err.Success() && var != NULL) + if (err.Success() && var) { AddOneVariable(context, var, valobj, current_id); context.m_found.variable = true; diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp index 22fae9112b8..88e7323e3a6 100644 --- a/lldb/source/Expression/ClangExpressionParser.cpp +++ b/lldb/source/Expression/ClangExpressionParser.cpp @@ -756,7 +756,7 @@ ClangExpressionParser::DisassembleFunction (Stream &stream, ExecutionContext &ex lldb::DisassemblerSP disassembler = Disassembler::FindPlugin(arch, NULL); - if (disassembler == NULL) + if (!disassembler) { ret.SetErrorToGenericError(); ret.SetErrorStringWithFormat("Unable to find disassembler plug-in for %s architecture.", arch.GetArchitectureName()); diff --git a/lldb/source/Expression/ClangFunction.cpp b/lldb/source/Expression/ClangFunction.cpp index f716f6731db..ad6f0db1f61 100644 --- a/lldb/source/Expression/ClangFunction.cpp +++ b/lldb/source/Expression/ClangFunction.cpp @@ -499,7 +499,7 @@ ClangFunction::ExecuteFunction ( stop_others, discard_on_error, this_arg)); - if (call_plan_sp == NULL) + if (!call_plan_sp) return eExecutionSetupError; call_plan_sp->SetPrivate(true); diff --git a/lldb/source/Expression/ClangUserExpression.cpp b/lldb/source/Expression/ClangUserExpression.cpp index 029b1539529..b1bef73415d 100644 --- a/lldb/source/Expression/ClangUserExpression.cpp +++ b/lldb/source/Expression/ClangUserExpression.cpp @@ -572,7 +572,7 @@ ClangUserExpression::Execute (Stream &error_stream, ((m_needs_object_ptr && m_objectivec) ? &cmd_ptr : NULL), shared_ptr_to_me)); - if (call_plan_sp == NULL || !call_plan_sp->ValidatePlan (NULL)) + if (!call_plan_sp || !call_plan_sp->ValidatePlan (NULL)) return eExecutionSetupError; lldb::addr_t function_stack_pointer = static_cast<ThreadPlanCallFunction *>(call_plan_sp.get())->GetFunctionStackPointer(); diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp index 8ff34cf6f99..5d2c09724f7 100644 --- a/lldb/source/Expression/IRInterpreter.cpp +++ b/lldb/source/Expression/IRInterpreter.cpp @@ -159,12 +159,12 @@ public: bool IsValid () { - return m_allocation != NULL; + return m_allocation; } bool IsInvalid () { - return m_allocation == NULL; + return !m_allocation; } }; |

