[Lldb-commits] [lldb] r262246 - Fix Clang-tidy modernize-use-nullptr warnings in source/Plugins/Language; other minor fixes.

Eugene Zelenko via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 29 11:41:31 PST 2016


Author: eugenezelenko
Date: Mon Feb 29 13:41:30 2016
New Revision: 262246

URL: http://llvm.org/viewvc/llvm-project?rev=262246&view=rev
Log:
Fix Clang-tidy modernize-use-nullptr warnings in source/Plugins/Language; other minor fixes.

Modified:
    lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
    lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp
    lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
    lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
    lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
    lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
    lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
    lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
    lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
    lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp
    lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp
    lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp
    lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp
    lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h

Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp Mon Feb 29 13:41:30 2016
@@ -1,4 +1,4 @@
-//===-- CPlusPlusLanguage.cpp --------------------------------------*- C++ -*-===//
+//===-- CPlusPlusLanguage.cpp -----------------------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -9,9 +9,17 @@
 
 #include "CPlusPlusLanguage.h"
 
+// C Includes
+// C++ Includes
+#include <cstring>
+#include <cctype>
+#include <functional>
+#include <mutex>
 
+// Other libraries and framework includes
 #include "llvm/ADT/StringRef.h"
 
+// Project includes
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/RegularExpression.h"
@@ -26,11 +34,6 @@
 #include "LibCxxAtomic.h"
 #include "LibStdcpp.h"
 
-#include <cstring>
-#include <cctype>
-#include <functional>
-#include <mutex>
-
 using namespace lldb;
 using namespace lldb_private;
 using namespace lldb_private::formatters;
@@ -56,10 +59,10 @@ CPlusPlusLanguage::GetPluginNameStatic()
     return g_name;
 }
 
-
 //------------------------------------------------------------------
 // PluginInterface protocol
 //------------------------------------------------------------------
+
 lldb_private::ConstString
 CPlusPlusLanguage::GetPluginName()
 {
@@ -75,6 +78,7 @@ CPlusPlusLanguage::GetPluginVersion()
 //------------------------------------------------------------------
 // Static Functions
 //------------------------------------------------------------------
+
 Language *
 CPlusPlusLanguage::CreateInstance (lldb::LanguageType language)
 {
@@ -320,10 +324,7 @@ CPlusPlusLanguage::IsCPPMangledName (con
     // this is a C++ mangled name, but we can put that off till there is actually more than one
     // we care about.
     
-    if (name && name[0] == '_' && name[1] == 'Z')
-        return true;
-    else
-        return false;
+    return (name != nullptr && name[0] == '_' && name[1] == 'Z');
 }
 
 bool
@@ -345,7 +346,6 @@ class CPPRuntimeEquivalents
 public:
     CPPRuntimeEquivalents ()
     {
-        
         m_impl.Append(ConstString("std::basic_string<char, std::char_traits<char>, std::allocator<char> >").AsCString(), ConstString("basic_string<char>"));
 
         // these two (with a prefixed std::) occur when c++stdlib string class occurs as a template argument in some STL container
@@ -365,11 +365,10 @@ public:
     FindExactMatches (ConstString& type_name,
                       std::vector<ConstString>& equivalents)
     {
-        
         uint32_t count = 0;
 
         for (ImplData match = m_impl.FindFirstValueForName(type_name.AsCString());
-             match != NULL;
+             match != nullptr;
              match = m_impl.FindNextValueForName(match))
         {
             equivalents.push_back(match->value);
@@ -388,7 +387,6 @@ public:
     FindPartialMatches (ConstString& type_name,
                         std::vector<ConstString>& equivalents)
     {
-        
         uint32_t count = 0;
         
         const char* type_name_cstr = type_name.AsCString();
@@ -407,11 +405,9 @@ public:
         }
         
         return count;
-        
     }
     
 private:
-    
     std::string& replace (std::string& target,
                           std::string& pattern,
                           std::string& with)
@@ -430,14 +426,13 @@ private:
                         const char *matching_key,
                         std::vector<ConstString>& equivalents)
     {
-        
         std::string matching_key_str(matching_key);
         ConstString original_const(original);
         
         uint32_t count = 0;
         
         for (ImplData match = m_impl.FindFirstValueForName(matching_key);
-             match != NULL;
+             match != nullptr;
              match = m_impl.FindNextValueForName(match))
         {
             std::string target(original);
@@ -471,7 +466,6 @@ GetEquivalentsMap ()
     return g_equivalents_map;
 }
 
-
 uint32_t
 CPlusPlusLanguage::FindEquivalentNames(ConstString type_name, std::vector<ConstString>& equivalents)
 {
@@ -479,8 +473,8 @@ CPlusPlusLanguage::FindEquivalentNames(C
 
     bool might_have_partials= 
         ( count == 0 )  // if we have a full name match just use it
-        && (strchr(type_name.AsCString(), '<') != NULL  // we should only have partial matches when templates are involved, check that we have
-            && strchr(type_name.AsCString(), '>') != NULL); // angle brackets in the type_name before trying to scan for partial matches
+        && (strchr(type_name.AsCString(), '<') != nullptr  // we should only have partial matches when templates are involved, check that we have
+            && strchr(type_name.AsCString(), '>') != nullptr); // angle brackets in the type_name before trying to scan for partial matches
     
     if ( might_have_partials )
         count = GetEquivalentsMap().FindPartialMatches(type_name, equivalents);
@@ -806,4 +800,3 @@ CPlusPlusLanguage::GetHardcodedSynthetic
     
     return g_formatters;
 }
-

Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp Mon Feb 29 13:41:30 2016
@@ -9,6 +9,10 @@
 
 #include "LibCxx.h"
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Core/DataBufferHeap.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Error.h"
@@ -74,12 +78,12 @@ lldb_private::formatters::LibcxxSmartPoi
 }
 
 lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd::LibcxxVectorBoolSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_bool_type(),
-m_exe_ctx_ref(),
-m_count(0),
-m_base_data_address(0),
-m_children()
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_bool_type(),
+    m_exe_ctx_ref(),
+    m_count(0),
+    m_base_data_address(0),
+    m_children()
 {
     if (valobj_sp)
     {
@@ -141,7 +145,7 @@ lldb_private::formatters::LibcxxVectorBo
             return ValueObjectSP();
     }
     bool bit_set = ((byte & mask) != 0);
-    DataBufferSP buffer_sp(new DataBufferHeap(m_bool_type.GetByteSize(nullptr),0));
+    DataBufferSP buffer_sp(new DataBufferHeap(m_bool_type.GetByteSize(nullptr), 0));
     if (bit_set && buffer_sp && buffer_sp->GetBytes())
         *(buffer_sp->GetBytes()) = 1; // regardless of endianness, anything non-zero is true
     StreamString name; name.Printf("[%" PRIu64 "]", (uint64_t)idx);
@@ -208,15 +212,12 @@ lldb_private::formatters::LibcxxVectorBo
     return idx;
 }
 
-lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd::~LibcxxVectorBoolSyntheticFrontEnd ()
-{}
+lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEnd::~LibcxxVectorBoolSyntheticFrontEnd() = default;
 
 SyntheticChildrenFrontEnd*
 lldb_private::formatters::LibcxxVectorBoolSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
 {
-    if (!valobj_sp)
-        return NULL;
-    return (new LibcxxVectorBoolSyntheticFrontEnd(valobj_sp));
+    return (valobj_sp ? new LibcxxVectorBoolSyntheticFrontEnd(valobj_sp) : nullptr);
 }
 
 /*
@@ -238,8 +239,8 @@ lldb_private::formatters::LibcxxVectorBo
  */
 
 lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::LibCxxMapIteratorSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_pair_ptr()
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_pair_ptr()
 {
     if (valobj_sp)
         Update();
@@ -264,11 +265,11 @@ lldb_private::formatters::LibCxxMapItera
     // it if were a ValueObjectSP, we would end up with a loop (iterator -> synthetic -> child -> parent == iterator)
     // and that would in turn leak memory by never allowing the ValueObjects to die and free their memory
     m_pair_ptr = valobj_sp->GetValueForExpressionPath(".__i_.__ptr_->__value_",
-                                                     NULL,
-                                                     NULL,
-                                                     NULL,
-                                                     ValueObject::GetValueForExpressionPathOptions().DontCheckDotVsArrowSyntax().SetSyntheticChildrenTraversal(ValueObject::GetValueForExpressionPathOptions::SyntheticChildrenTraversal::None),
-                                                     NULL).get();
+                                                      nullptr,
+                                                      nullptr,
+                                                      nullptr,
+                                                      ValueObject::GetValueForExpressionPathOptions().DontCheckDotVsArrowSyntax().SetSyntheticChildrenTraversal(ValueObject::GetValueForExpressionPathOptions::SyntheticChildrenTraversal::None),
+                                                      nullptr).get();
     
     return false;
 }
@@ -312,9 +313,7 @@ lldb_private::formatters::LibCxxMapItera
 SyntheticChildrenFrontEnd*
 lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
 {
-    if (!valobj_sp)
-        return NULL;
-    return (new LibCxxMapIteratorSyntheticFrontEnd(valobj_sp));
+    return (valobj_sp ? new LibCxxMapIteratorSyntheticFrontEnd(valobj_sp) : nullptr);
 }
 
 /*
@@ -332,18 +331,16 @@ lldb_private::formatters::LibCxxVectorIt
     static ConstString g_item_name;
     if (!g_item_name)
         g_item_name.SetCString("__i");
-    if (!valobj_sp)
-        return NULL;
-    return (new VectorIteratorSyntheticFrontEnd(valobj_sp,g_item_name));
+    return (valobj_sp ? new VectorIteratorSyntheticFrontEnd(valobj_sp, g_item_name) : nullptr);
 }
 
 lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::LibcxxSharedPtrSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_cntrl(NULL),
-m_count_sp(),
-m_weak_count_sp(),
-m_ptr_size(0),
-m_byte_order(lldb::eByteOrderInvalid)
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_cntrl(nullptr),
+    m_count_sp(),
+    m_weak_count_sp(),
+    m_ptr_size(0),
+    m_byte_order(lldb::eByteOrderInvalid)
 {
     if (valobj_sp)
         Update();
@@ -404,7 +401,7 @@ lldb_private::formatters::LibcxxSharedPt
 {
     m_count_sp.reset();
     m_weak_count_sp.reset();
-    m_cntrl = NULL;
+    m_cntrl = nullptr;
     
     ValueObjectSP valobj_sp = m_backend.GetSP();
     if (!valobj_sp)
@@ -441,15 +438,12 @@ lldb_private::formatters::LibcxxSharedPt
     return UINT32_MAX;
 }
 
-lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::~LibcxxSharedPtrSyntheticFrontEnd ()
-{}
+lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::~LibcxxSharedPtrSyntheticFrontEnd() = default;
 
 SyntheticChildrenFrontEnd*
 lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
 {
-    if (!valobj_sp)
-        return NULL;
-    return (new LibcxxSharedPtrSyntheticFrontEnd(valobj_sp));
+    return (valobj_sp ? new LibcxxSharedPtrSyntheticFrontEnd(valobj_sp) : nullptr);
 }
 
 bool
@@ -462,7 +456,7 @@ lldb_private::formatters::LibcxxContaine
             return false;
         stream.Printf("0x%016" PRIx64 " ", value);
     }
-    return FormatEntity::FormatStringRef("size=${svar%#}", stream, NULL, NULL, NULL, &valobj, false, false);
+    return FormatEntity::FormatStringRef("size=${svar%#}", stream, nullptr, nullptr, nullptr, &valobj, false, false);
 }
 
 // the field layout in a libc++ string (cap, side, data or data, size, cap)
@@ -551,7 +545,7 @@ bool
 lldb_private::formatters::LibcxxWStringSummaryProvider (ValueObject& valobj, Stream& stream, const TypeSummaryOptions& summary_options)
 {
     uint64_t size = 0;
-    ValueObjectSP location_sp((ValueObject*)nullptr);
+    ValueObjectSP location_sp;
     if (!ExtractLibcxxStringInfo(valobj, location_sp, size))
         return false;
     if (size == 0)
@@ -613,7 +607,7 @@ bool
 lldb_private::formatters::LibcxxStringSummaryProvider (ValueObject& valobj, Stream& stream, const TypeSummaryOptions& summary_options)
 {
     uint64_t size = 0;
-    ValueObjectSP location_sp((ValueObject*)nullptr);
+    ValueObjectSP location_sp;
     
     if (!ExtractLibcxxStringInfo(valobj, location_sp, size))
         return false;
@@ -643,7 +637,7 @@ lldb_private::formatters::LibcxxStringSu
     
     options.SetData(extractor);
     options.SetStream(&stream);
-    options.SetPrefixToken(0);
+    options.SetPrefixToken(nullptr);
     options.SetQuote('"');
     options.SetSourceSize(size);
     options.SetBinaryZeroIsTerminator(false);

Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp Mon Feb 29 13:41:30 2016
@@ -56,12 +56,12 @@ namespace lldb_private {
 } // namespace lldb_private
 
 lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd::LibcxxInitializerListSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_start(NULL),
-m_element_type(),
-m_element_size(0),
-m_num_elements(0),
-m_children()
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_start(nullptr),
+    m_element_type(),
+    m_element_size(0),
+    m_num_elements(0),
+    m_children()
 {
     if (valobj_sp)
         Update();
@@ -113,7 +113,7 @@ lldb_private::formatters::LibcxxInitiali
     m_children.clear();
     lldb::TemplateArgumentKind kind;
     m_element_type = m_backend.GetCompilerType().GetTemplateArgument(0, kind);
-    if (kind != lldb::eTemplateArgumentKindType || false == m_element_type.IsValid())
+    if (kind != lldb::eTemplateArgumentKindType || !m_element_type.IsValid())
         return false;
     
     m_element_size = m_element_type.GetByteSize(nullptr);
@@ -141,7 +141,5 @@ lldb_private::formatters::LibcxxInitiali
 lldb_private::SyntheticChildrenFrontEnd*
 lldb_private::formatters::LibcxxInitializerListSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
 {
-    if (!valobj_sp)
-        return NULL;
-    return (new LibcxxInitializerListSyntheticFrontEnd(valobj_sp));
+    return (valobj_sp ? new LibcxxInitializerListSyntheticFrontEnd(valobj_sp) : nullptr);
 }

Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp Mon Feb 29 13:41:30 2016
@@ -34,7 +34,7 @@ namespace {
     public:
         ListEntry() = default;
         ListEntry (ValueObjectSP entry_sp) : m_entry_sp(entry_sp) {}
-        ListEntry (const ListEntry& rhs) : m_entry_sp(rhs.m_entry_sp) {}
+        ListEntry(const ListEntry& rhs) = default;
         ListEntry (ValueObject* entry) : m_entry_sp(entry ? entry->GetSP() : ValueObjectSP()) {}
 
         ListEntry
@@ -69,7 +69,7 @@ namespace {
 
         explicit operator bool ()
         {
-            return GetEntry().get() != nullptr && null() == false;
+            return GetEntry() && !null();
         }
 
         ValueObjectSP
@@ -106,7 +106,7 @@ namespace {
         ListIterator() = default;
         ListIterator (ListEntry entry) : m_entry(entry) {}
         ListIterator (ValueObjectSP entry) : m_entry(entry) {}
-        ListIterator (const ListIterator& rhs) : m_entry(rhs.m_entry) {}
+        ListIterator(const ListIterator& rhs) = default;
         ListIterator (ValueObject* entry) : m_entry(entry) {}
         
         ValueObjectSP
@@ -207,16 +207,16 @@ namespace lldb_private {
 } // namespace lldb_private
 
 lldb_private::formatters::LibcxxStdListSyntheticFrontEnd::LibcxxStdListSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_list_capping_size(0),
-m_loop_detected(0),
-m_node_address(),
-m_head(NULL),
-m_tail(NULL),
-m_element_type(),
-m_count(UINT32_MAX),
-m_children(),
-m_iterators()
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_list_capping_size(0),
+    m_loop_detected(0),
+    m_node_address(),
+    m_head(nullptr),
+    m_tail(nullptr),
+    m_element_type(),
+    m_count(UINT32_MAX),
+    m_children(),
+    m_iterators()
 {
     if (valobj_sp)
         Update();
@@ -225,7 +225,7 @@ m_iterators()
 bool
 lldb_private::formatters::LibcxxStdListSyntheticFrontEnd::HasLoop(size_t count)
 {
-    if (g_use_loop_detect == false)
+    if (!g_use_loop_detect)
         return false;
     // don't bother checking for a loop if we won't actually need to jump nodes
     if (m_count < 2)
@@ -358,7 +358,7 @@ lldb_private::formatters::LibcxxStdListS
 {
     m_children.clear();
     m_iterators.clear();
-    m_head = m_tail = NULL;
+    m_head = m_tail = nullptr;
     m_node_address = 0;
     m_count = UINT32_MAX;
     m_loop_detected = 0;
@@ -372,7 +372,7 @@ lldb_private::formatters::LibcxxStdListS
         m_list_capping_size = m_backend.GetTargetSP()->GetMaximumNumberOfChildrenToDisplay();
     if (m_list_capping_size == 0)
         m_list_capping_size = 255;
-    if (err.Fail() || backend_addr.get() == NULL)
+    if (err.Fail() || !backend_addr)
         return false;
     m_node_address = backend_addr->GetValueAsUnsigned(0);
     if (!m_node_address || m_node_address == LLDB_INVALID_ADDRESS)
@@ -408,7 +408,5 @@ lldb_private::formatters::LibcxxStdListS
 SyntheticChildrenFrontEnd*
 lldb_private::formatters::LibcxxStdListSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
 {
-    if (!valobj_sp)
-        return NULL;
-    return (new LibcxxStdListSyntheticFrontEnd(valobj_sp));
+    return (valobj_sp ? new LibcxxStdListSyntheticFrontEnd(valobj_sp) : nullptr);
 }

Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp Mon Feb 29 13:41:30 2016
@@ -32,7 +32,7 @@ class MapEntry
 public:
     MapEntry() = default;
     explicit MapEntry (ValueObjectSP entry_sp) : m_entry_sp(entry_sp) {}
-    MapEntry (const MapEntry& rhs) : m_entry_sp(rhs.m_entry_sp) {}
+    MapEntry(const MapEntry& rhs) = default;
     explicit MapEntry (ValueObject* entry) : m_entry_sp(entry ? entry->GetSP() : ValueObjectSP()) {}
     
     ValueObjectSP
@@ -124,7 +124,7 @@ public:
     ValueObjectSP
     advance (size_t count)
     {
-        ValueObjectSP fail(nullptr);
+        ValueObjectSP fail;
         if (m_error)
             return fail;
         size_t steps = 0;
@@ -147,7 +147,7 @@ protected:
         if (m_entry.null())
             return;
         MapEntry right(m_entry.right());
-        if (right.null() == false)
+        if (!right.null())
         {
             m_entry = tree_min(std::move(right));
             return;
@@ -179,7 +179,7 @@ private:
             return MapEntry();
         MapEntry left(x.left());
         size_t steps = 0;
-        while (left.null() == false)
+        while (!left.null())
         {
             if (left.error())
             {
@@ -253,14 +253,14 @@ namespace lldb_private {
 } // namespace lldb_private
 
 lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::LibcxxStdMapSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_tree(NULL),
-m_root_node(NULL),
-m_element_type(),
-m_skip_size(UINT32_MAX),
-m_count(UINT32_MAX),
-m_children(),
-m_iterators()
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_tree(nullptr),
+    m_root_node(nullptr),
+    m_element_type(),
+    m_skip_size(UINT32_MAX),
+    m_count(UINT32_MAX),
+    m_children(),
+    m_iterators()
 {
     if (valobj_sp)
         Update();
@@ -274,7 +274,7 @@ lldb_private::formatters::LibcxxStdMapSy
 
     if (m_count != UINT32_MAX)
         return m_count;
-    if (m_tree == NULL)
+    if (m_tree == nullptr)
         return 0;
     ValueObjectSP m_item(m_tree->GetChildMemberWithName(g___pair3_, true));
     if (!m_item)
@@ -315,7 +315,7 @@ lldb_private::formatters::LibcxxStdMapSy
         return;
     CompilerType node_type(node->GetCompilerType());
     uint64_t bit_offset;
-    if (node_type.GetIndexOfFieldWithName("__value_", NULL, &bit_offset) == UINT32_MAX)
+    if (node_type.GetIndexOfFieldWithName("__value_", nullptr, &bit_offset) == UINT32_MAX)
         return;
     m_skip_size = bit_offset / 8u;
 }
@@ -327,10 +327,9 @@ lldb_private::formatters::LibcxxStdMapSy
     static ConstString g___nc("__nc");
     static ConstString g___value_("__value_");
 
-    
     if (idx >= CalculateNumChildren())
         return lldb::ValueObjectSP();
-    if (m_tree == NULL || m_root_node == NULL)
+    if (m_tree == nullptr || m_root_node == nullptr)
         return lldb::ValueObjectSP();
     
     auto cached = m_children.find(idx);
@@ -352,10 +351,10 @@ lldb_private::formatters::LibcxxStdMapSy
     }
     
     ValueObjectSP iterated_sp(iterator.advance(actual_advancde));
-    if (iterated_sp.get() == NULL)
+    if (!iterated_sp)
     {
         // this tree is garbage - stop
-        m_tree = NULL; // this will stop all future searches until an Update() happens
+        m_tree = nullptr; // this will stop all future searches until an Update() happens
         return iterated_sp;
     }
     if (GetDataType())
@@ -366,14 +365,14 @@ lldb_private::formatters::LibcxxStdMapSy
             iterated_sp = iterated_sp->Dereference(error);
             if (!iterated_sp || error.Fail())
             {
-                m_tree = NULL;
+                m_tree = nullptr;
                 return lldb::ValueObjectSP();
             }
             GetValueOffset(iterated_sp);
             iterated_sp = iterated_sp->GetChildMemberWithName(g___value_, true);
             if (!iterated_sp)
             {
-                m_tree = NULL;
+                m_tree = nullptr;
                 return lldb::ValueObjectSP();
             }
         }
@@ -385,20 +384,20 @@ lldb_private::formatters::LibcxxStdMapSy
                 GetChildAtIndex(0);
             if (m_skip_size == UINT32_MAX)
             {
-                m_tree = NULL;
+                m_tree = nullptr;
                 return lldb::ValueObjectSP();
             }
             iterated_sp = iterated_sp->GetSyntheticChildAtOffset(m_skip_size, m_element_type, true);
             if (!iterated_sp)
             {
-                m_tree = NULL;
+                m_tree = nullptr;
                 return lldb::ValueObjectSP();
             }
         }
     }
     else
     {
-        m_tree = NULL;
+        m_tree = nullptr;
         return lldb::ValueObjectSP();
     }
     // at this point we have a valid 
@@ -408,7 +407,7 @@ lldb_private::formatters::LibcxxStdMapSy
     iterated_sp->GetData(data, error);
     if (error.Fail())
     {
-        m_tree = NULL;
+        m_tree = nullptr;
         return lldb::ValueObjectSP();
     }
     StreamString name;
@@ -447,7 +446,7 @@ lldb_private::formatters::LibcxxStdMapSy
     static ConstString g___tree_("__tree_");
     static ConstString g___begin_node_("__begin_node_");
     m_count = UINT32_MAX;
-    m_tree = m_root_node = NULL;
+    m_tree = m_root_node = nullptr;
     m_children.clear();
     m_iterators.clear();
     m_tree = m_backend.GetChildMemberWithName(g___tree_, true).get();
@@ -472,7 +471,5 @@ lldb_private::formatters::LibcxxStdMapSy
 SyntheticChildrenFrontEnd*
 lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
 {
-    if (!valobj_sp)
-        return NULL;
-    return (new LibcxxStdMapSyntheticFrontEnd(valobj_sp));
+    return (valobj_sp ? new LibcxxStdMapSyntheticFrontEnd(valobj_sp) : nullptr);
 }

Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp Mon Feb 29 13:41:30 2016
@@ -62,12 +62,12 @@ namespace lldb_private {
 } // namespace lldb_private
 
 lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::LibcxxStdUnorderedMapSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_tree(NULL),
-m_num_elements(0),
-m_next_element(nullptr),
-m_children(),
-m_elements_cache()
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_tree(nullptr),
+    m_num_elements(0),
+    m_next_element(nullptr),
+    m_children(),
+    m_elements_cache()
 {
     if (valobj_sp)
         Update();
@@ -86,7 +86,7 @@ lldb_private::formatters::LibcxxStdUnord
 {
     if (idx >= CalculateNumChildren())
         return lldb::ValueObjectSP();
-    if (m_tree == NULL)
+    if (m_tree == nullptr)
         return lldb::ValueObjectSP();
     
     auto cached = m_children.find(idx);
@@ -166,7 +166,5 @@ lldb_private::formatters::LibcxxStdUnord
 SyntheticChildrenFrontEnd*
 lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
 {
-    if (!valobj_sp)
-        return NULL;
-    return (new LibcxxStdUnorderedMapSyntheticFrontEnd(valobj_sp));
+    return (valobj_sp ? new LibcxxStdUnorderedMapSyntheticFrontEnd(valobj_sp) : nullptr);
 }

Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp Mon Feb 29 13:41:30 2016
@@ -56,12 +56,12 @@ namespace lldb_private {
 } // namespace lldb_private
 
 lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::LibcxxStdVectorSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_start(NULL),
-m_finish(NULL),
-m_element_type(),
-m_element_size(0),
-m_children()
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_start(nullptr),
+    m_finish(nullptr),
+    m_element_type(),
+    m_element_size(0),
+    m_children()
 {
     if (valobj_sp)
         Update();
@@ -116,7 +116,7 @@ lldb_private::formatters::LibcxxStdVecto
 bool
 lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::Update()
 {
-    m_start = m_finish = NULL;
+    m_start = m_finish = nullptr;
     m_children.clear();
     ValueObjectSP data_type_finder_sp(m_backend.GetChildMemberWithName(ConstString("__end_cap_"),true));
     if (!data_type_finder_sp)
@@ -153,7 +153,5 @@ lldb_private::formatters::LibcxxStdVecto
 lldb_private::SyntheticChildrenFrontEnd*
 lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
 {
-    if (!valobj_sp)
-        return NULL;
-    return (new LibcxxStdVectorSyntheticFrontEnd(valobj_sp));
+    return (valobj_sp ? new LibcxxStdVectorSyntheticFrontEnd(valobj_sp) : nullptr);
 }

Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp Mon Feb 29 13:41:30 2016
@@ -1,4 +1,4 @@
-//===-- LibStdcpp.cpp ---------------------------------------------*- C++ -*-===//
+//===-- LibStdcpp.cpp -------------------------------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -9,6 +9,10 @@
 
 #include "LibStdcpp.h"
 
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
 #include "lldb/Core/DataBufferHeap.h"
 #include "lldb/Core/Error.h"
 #include "lldb/Core/Stream.h"
@@ -28,7 +32,9 @@ class LibstdcppMapIteratorSyntheticFront
 {
 public:
     LibstdcppMapIteratorSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
-    
+
+    ~LibstdcppMapIteratorSyntheticFrontEnd() override = default;
+
     size_t
     CalculateNumChildren() override;
     
@@ -44,8 +50,6 @@ public:
     size_t
     GetIndexOfChildWithName (const ConstString &name) override;
     
-    ~LibstdcppMapIteratorSyntheticFrontEnd() override;
-    
 private:
     ExecutionContextRef m_exe_ctx_ref;
     lldb::addr_t m_pair_address;
@@ -66,7 +70,7 @@ private:
  */
 
 LibstdcppMapIteratorSyntheticFrontEnd::LibstdcppMapIteratorSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-    SyntheticChildrenFrontEnd(*valobj_sp.get()),
+    SyntheticChildrenFrontEnd(*valobj_sp),
     m_exe_ctx_ref(),
     m_pair_address(0),
     m_pair_type(),
@@ -159,15 +163,10 @@ LibstdcppMapIteratorSyntheticFrontEnd::G
     return UINT32_MAX;
 }
 
-LibstdcppMapIteratorSyntheticFrontEnd::~LibstdcppMapIteratorSyntheticFrontEnd ()
-{}
-
 SyntheticChildrenFrontEnd*
 lldb_private::formatters::LibstdcppMapIteratorSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
 {
-    if (!valobj_sp)
-        return NULL;
-    return (new LibstdcppMapIteratorSyntheticFrontEnd(valobj_sp));
+    return (valobj_sp ? new LibstdcppMapIteratorSyntheticFrontEnd(valobj_sp) : nullptr);
 }
 
 /*
@@ -185,17 +184,15 @@ lldb_private::formatters::LibStdcppVecto
     static ConstString g_item_name;
     if (!g_item_name)
         g_item_name.SetCString("_M_current");
-    if (!valobj_sp)
-        return NULL;
-    return (new VectorIteratorSyntheticFrontEnd(valobj_sp,g_item_name));
+    return (valobj_sp ? new VectorIteratorSyntheticFrontEnd(valobj_sp, g_item_name) : nullptr);
 }
 
 lldb_private::formatters::VectorIteratorSyntheticFrontEnd::VectorIteratorSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp,
                                                                                             ConstString item_name) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_exe_ctx_ref(),
-m_item_name(item_name),
-m_item_sp()
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_exe_ctx_ref(),
+    m_item_name(item_name),
+    m_item_sp()
 {
     if (valobj_sp)
         Update();
@@ -254,9 +251,7 @@ lldb_private::formatters::VectorIterator
     return UINT32_MAX;
 }
 
-lldb_private::formatters::VectorIteratorSyntheticFrontEnd::~VectorIteratorSyntheticFrontEnd ()
-{
-}
+lldb_private::formatters::VectorIteratorSyntheticFrontEnd::~VectorIteratorSyntheticFrontEnd() = default;
 
 bool
 lldb_private::formatters::LibStdcppStringSummaryProvider (ValueObject& valobj, Stream& stream, const TypeSummaryOptions& options)

Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Mon Feb 29 13:41:30 2016
@@ -50,7 +50,7 @@ lldb_private::formatters::NSBundleSummar
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     uint32_t ptr_size = process_sp->GetAddressByteSize();
@@ -71,7 +71,7 @@ lldb_private::formatters::NSBundleSummar
         ValueObjectSP text(valobj.GetSyntheticChildAtOffset(offset, valobj.GetCompilerType().GetBasicTypeFromAST(lldb::eBasicTypeObjCID), true));
         
         StreamString summary_stream;
-        bool was_nsstring_ok = NSStringSummaryProvider(*text.get(), summary_stream, options);
+        bool was_nsstring_ok = NSStringSummaryProvider(*text, summary_stream, options);
         if (was_nsstring_ok && summary_stream.GetSize() > 0)
         {
             stream.Printf("%s",summary_stream.GetData());
@@ -97,7 +97,7 @@ lldb_private::formatters::NSTimeZoneSumm
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     uint32_t ptr_size = process_sp->GetAddressByteSize();
@@ -117,7 +117,7 @@ lldb_private::formatters::NSTimeZoneSumm
         uint64_t offset = ptr_size;
         ValueObjectSP text(valobj.GetSyntheticChildAtOffset(offset, valobj.GetCompilerType(), true));
         StreamString summary_stream;
-        bool was_nsstring_ok = NSStringSummaryProvider(*text.get(), summary_stream, options);
+        bool was_nsstring_ok = NSStringSummaryProvider(*text, summary_stream, options);
         if (was_nsstring_ok && summary_stream.GetSize() > 0)
         {
             stream.Printf("%s",summary_stream.GetData());
@@ -141,7 +141,7 @@ lldb_private::formatters::NSNotification
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     uint32_t ptr_size = process_sp->GetAddressByteSize();
@@ -161,7 +161,7 @@ lldb_private::formatters::NSNotification
         uint64_t offset = ptr_size;
         ValueObjectSP text(valobj.GetSyntheticChildAtOffset(offset, valobj.GetCompilerType(), true));
         StreamString summary_stream;
-        bool was_nsstring_ok = NSStringSummaryProvider(*text.get(), summary_stream, options);
+        bool was_nsstring_ok = NSStringSummaryProvider(*text, summary_stream, options);
         if (was_nsstring_ok && summary_stream.GetSize() > 0)
         {
             stream.Printf("%s",summary_stream.GetData());
@@ -187,7 +187,7 @@ lldb_private::formatters::NSMachPortSumm
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     uint32_t ptr_size = process_sp->GetAddressByteSize();
@@ -236,7 +236,7 @@ lldb_private::formatters::NSIndexSetSumm
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     uint32_t ptr_size = process_sp->GetAddressByteSize();
@@ -458,7 +458,7 @@ lldb_private::formatters::NSNumberSummar
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     uint32_t ptr_size = process_sp->GetAddressByteSize();
@@ -582,7 +582,7 @@ lldb_private::formatters::NSURLSummaryPr
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     uint32_t ptr_size = process_sp->GetAddressByteSize();
@@ -647,7 +647,7 @@ lldb_private::formatters::NSDateSummaryP
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     uint32_t ptr_size = process_sp->GetAddressByteSize();
@@ -694,7 +694,7 @@ lldb_private::formatters::NSDateSummaryP
     }
     else
     {
-        if (ExtractValueFromObjCExpression(valobj, "NSTimeInterval", "ExtractValueFromObjCExpression", date_value_bits) == false)
+        if (!ExtractValueFromObjCExpression(valobj, "NSTimeInterval", "ExtractValueFromObjCExpression", date_value_bits))
             return false;
         date_value = *((double*)&date_value_bits);
     }
@@ -732,7 +732,7 @@ lldb_private::formatters::ObjCClassSumma
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptorFromISA(valobj.GetValueAsUnsigned(0)));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     ConstString class_name = descriptor->GetClassName();
@@ -751,7 +751,7 @@ class ObjCClassSyntheticChildrenFrontEnd
 {
 public:
     ObjCClassSyntheticChildrenFrontEnd (lldb::ValueObjectSP valobj_sp) :
-    SyntheticChildrenFrontEnd(*valobj_sp.get())
+        SyntheticChildrenFrontEnd(*valobj_sp)
     {
     }
     
@@ -809,7 +809,7 @@ lldb_private::formatters::NSDataSummaryP
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     bool is_64bit = (process_sp->GetAddressByteSize() == 8);
@@ -936,7 +936,7 @@ lldb_private::formatters::GetOSXEpoch ()
         tm_epoch.tm_year = 2001-1900; // for some reason, we need to subtract 1900 from this field. not sure why.
         tm_epoch.tm_isdst = -1;
         tm_epoch.tm_gmtoff = 0;
-        tm_epoch.tm_zone = NULL;
+        tm_epoch.tm_zone = nullptr;
         epoch = timegm(&tm_epoch);
 #endif
     }

Modified: lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp Mon Feb 29 13:41:30 2016
@@ -103,7 +103,7 @@ namespace  lldb_private {
             struct DataDescriptor_32
             {
                 uint32_t _used;
-                uint32_t _priv1 : 2 ;
+                uint32_t _priv1 : 2;
                 uint32_t _size : 30;
                 uint32_t _priv2 : 2;
                 uint32_t _offset : 30;
@@ -114,7 +114,7 @@ namespace  lldb_private {
             struct DataDescriptor_64
             {
                 uint64_t _used;
-                uint64_t _priv1 : 2 ;
+                uint64_t _priv1 : 2;
                 uint64_t _size : 62;
                 uint64_t _priv2 : 2;
                 uint64_t _offset : 62;
@@ -246,7 +246,7 @@ lldb_private::formatters::NSArraySummary
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     uint32_t ptr_size = process_sp->GetAddressByteSize();
@@ -289,7 +289,7 @@ lldb_private::formatters::NSArraySummary
             return false;
     }
     else
-            return false;
+        return false;
     
     std::string prefix,suffix;
     if (Language* language = Language::FindPlugin(options.GetLanguage()))
@@ -328,16 +328,16 @@ m_children()
 }
 
 lldb_private::formatters::NSArrayMSyntheticFrontEnd_109::NSArrayMSyntheticFrontEnd_109 (lldb::ValueObjectSP valobj_sp) :
-NSArrayMSyntheticFrontEnd(valobj_sp),
-m_data_32(NULL),
-m_data_64(NULL)
+    NSArrayMSyntheticFrontEnd(valobj_sp),
+    m_data_32(nullptr),
+    m_data_64(nullptr)
 {
 }
 
 lldb_private::formatters::NSArrayMSyntheticFrontEnd_1010::NSArrayMSyntheticFrontEnd_1010 (lldb::ValueObjectSP valobj_sp) :
-NSArrayMSyntheticFrontEnd(valobj_sp),
-m_data_32(NULL),
-m_data_64(NULL)
+    NSArrayMSyntheticFrontEnd(valobj_sp),
+    m_data_32(nullptr),
+    m_data_64(nullptr)
 {
 }
 
@@ -375,9 +375,9 @@ lldb_private::formatters::NSArrayMSynthe
     ValueObjectSP valobj_sp = m_backend.GetSP();
     m_ptr_size = 0;
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
     if (!valobj_sp)
         return false;
     m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();
@@ -410,9 +410,9 @@ lldb_private::formatters::NSArrayMSynthe
     ValueObjectSP valobj_sp = m_backend.GetSP();
     m_ptr_size = 0;
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
     if (!valobj_sp)
         return false;
     m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();
@@ -457,9 +457,9 @@ lldb_private::formatters::NSArrayMSynthe
 lldb_private::formatters::NSArrayMSyntheticFrontEnd_109::~NSArrayMSyntheticFrontEnd_109()
 {
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
 }
 
 lldb::addr_t
@@ -501,9 +501,9 @@ lldb_private::formatters::NSArrayMSynthe
 lldb_private::formatters::NSArrayMSyntheticFrontEnd_1010::~NSArrayMSyntheticFrontEnd_1010()
 {
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
 }
 
 lldb::addr_t
@@ -543,11 +543,11 @@ lldb_private::formatters::NSArrayMSynthe
 }
 
 lldb_private::formatters::NSArrayISyntheticFrontEnd::NSArrayISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd (*valobj_sp.get()),
-m_exe_ctx_ref (),
-m_ptr_size (8),
-m_items (0),
-m_data_ptr (0)
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_exe_ctx_ref(),
+    m_ptr_size(8),
+    m_items(0),
+    m_data_ptr(0)
 {
     if (valobj_sp)
     {
@@ -632,7 +632,7 @@ lldb_private::formatters::NSArrayISynthe
 }
 
 lldb_private::formatters::NSArray0SyntheticFrontEnd::NSArray0SyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd (*valobj_sp.get())
+    SyntheticChildrenFrontEnd(*valobj_sp)
 {
 }
 
@@ -673,10 +673,10 @@ SyntheticChildrenFrontEnd* lldb_private:
     
     lldb::ProcessSP process_sp (valobj_sp->GetProcessSP());
     if (!process_sp)
-        return NULL;
+        return nullptr;
     AppleObjCRuntime *runtime = llvm::dyn_cast_or_null<AppleObjCRuntime>(process_sp->GetObjCLanguageRuntime());
     if (!runtime)
-        return NULL;
+        return nullptr;
     
     CompilerType valobj_type(valobj_sp->GetCompilerType());
     Flags flags(valobj_type.GetTypeInfo());
@@ -686,18 +686,18 @@ SyntheticChildrenFrontEnd* lldb_private:
         Error error;
         valobj_sp = valobj_sp->AddressOf(error);
         if (error.Fail() || !valobj_sp)
-            return NULL;
+            return nullptr;
     }
     
-    ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(*valobj_sp.get()));
+    ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(*valobj_sp));
     
-    if (!descriptor.get() || !descriptor->IsValid())
-        return NULL;
+    if (!descriptor || !descriptor->IsValid())
+        return nullptr;
     
     const char* class_name = descriptor->GetClassName().GetCString();
     
     if (!class_name || !*class_name)
-        return NULL;
+        return nullptr;
     
     if (!strcmp(class_name,"__NSArrayI"))
     {

Modified: lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp Mon Feb 29 13:41:30 2016
@@ -63,7 +63,7 @@ GetLLDBNSPairType (TargetSP target_sp)
         
         if (!compiler_type)
         {
-            compiler_type = target_ast_context->CreateRecordType(NULL, lldb::eAccessPublic, g___lldb_autogen_nspair.GetCString(), clang::TTK_Struct, lldb::eLanguageTypeC);
+            compiler_type = target_ast_context->CreateRecordType(nullptr, lldb::eAccessPublic, g___lldb_autogen_nspair.GetCString(), clang::TTK_Struct, lldb::eLanguageTypeC);
             
             if (compiler_type)
             {
@@ -209,7 +209,7 @@ lldb_private::formatters::NSDictionarySu
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     uint32_t ptr_size = process_sp->GetAddressByteSize();
@@ -286,10 +286,10 @@ SyntheticChildrenFrontEnd* lldb_private:
 {
     lldb::ProcessSP process_sp (valobj_sp->GetProcessSP());
     if (!process_sp)
-        return NULL;
+        return nullptr;
     ObjCLanguageRuntime *runtime = (ObjCLanguageRuntime*)process_sp->GetLanguageRuntime(lldb::eLanguageTypeObjC);
     if (!runtime)
-        return NULL;
+        return nullptr;
     
     CompilerType valobj_type(valobj_sp->GetCompilerType());
     Flags flags(valobj_type.GetTypeInfo());
@@ -299,19 +299,19 @@ SyntheticChildrenFrontEnd* lldb_private:
         Error error;
         valobj_sp = valobj_sp->AddressOf(error);
         if (error.Fail() || !valobj_sp)
-            return NULL;
+            return nullptr;
     }
     
-    ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(*valobj_sp.get()));
+    ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(*valobj_sp));
     
-    if (!descriptor.get() || !descriptor->IsValid())
-        return NULL;
+    if (!descriptor || !descriptor->IsValid())
+        return nullptr;
     
     ConstString class_name_cs = descriptor->GetClassName();
     const char* class_name = class_name_cs.GetCString();
     
     if (!class_name || !*class_name)
-        return NULL;
+        return nullptr;
     
     if (!strcmp(class_name,"__NSDictionaryI"))
     {
@@ -333,22 +333,22 @@ SyntheticChildrenFrontEnd* lldb_private:
 }
 
 lldb_private::formatters::NSDictionaryISyntheticFrontEnd::NSDictionaryISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_exe_ctx_ref(),
-m_ptr_size(8),
-m_order(lldb::eByteOrderInvalid),
-m_data_32(NULL),
-m_data_64(NULL),
-m_pair_type()
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_exe_ctx_ref(),
+    m_ptr_size(8),
+    m_order(lldb::eByteOrderInvalid),
+    m_data_32(nullptr),
+    m_data_64(nullptr),
+    m_pair_type()
 {
 }
 
 lldb_private::formatters::NSDictionaryISyntheticFrontEnd::~NSDictionaryISyntheticFrontEnd ()
 {
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
 }
 
 size_t
@@ -374,9 +374,9 @@ lldb_private::formatters::NSDictionaryIS
 {
     m_children.clear();
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
     m_ptr_size = 0;
     ValueObjectSP valobj_sp = m_backend.GetSP();
     if (!valobj_sp)
@@ -498,22 +498,22 @@ lldb_private::formatters::NSDictionaryIS
 }
 
 lldb_private::formatters::NSDictionaryMSyntheticFrontEnd::NSDictionaryMSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_exe_ctx_ref(),
-m_ptr_size(8),
-m_order(lldb::eByteOrderInvalid),
-m_data_32(NULL),
-m_data_64(NULL),
-m_pair_type()
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_exe_ctx_ref(),
+    m_ptr_size(8),
+    m_order(lldb::eByteOrderInvalid),
+    m_data_32(nullptr),
+    m_data_64(nullptr),
+    m_pair_type()
 {
 }
 
 lldb_private::formatters::NSDictionaryMSyntheticFrontEnd::~NSDictionaryMSyntheticFrontEnd ()
 {
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
 }
 
 size_t
@@ -541,9 +541,9 @@ lldb_private::formatters::NSDictionaryMS
     ValueObjectSP valobj_sp = m_backend.GetSP();
     m_ptr_size = 0;
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
     if (!valobj_sp)
         return false;
     m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();

Modified: lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp Mon Feb 29 13:41:30 2016
@@ -215,7 +215,7 @@ lldb_private::formatters::NSSetSummaryPr
     
     ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(valobj));
     
-    if (!descriptor.get() || !descriptor->IsValid())
+    if (!descriptor || !descriptor->IsValid())
         return false;
     
     uint32_t ptr_size = process_sp->GetAddressByteSize();
@@ -304,10 +304,10 @@ SyntheticChildrenFrontEnd* lldb_private:
 {
     lldb::ProcessSP process_sp (valobj_sp->GetProcessSP());
     if (!process_sp)
-        return NULL;
+        return nullptr;
     ObjCLanguageRuntime *runtime = (ObjCLanguageRuntime*)process_sp->GetLanguageRuntime(lldb::eLanguageTypeObjC);
     if (!runtime)
-        return NULL;
+        return nullptr;
     
     CompilerType valobj_type(valobj_sp->GetCompilerType());
     Flags flags(valobj_type.GetTypeInfo());
@@ -317,19 +317,19 @@ SyntheticChildrenFrontEnd* lldb_private:
         Error error;
         valobj_sp = valobj_sp->AddressOf(error);
         if (error.Fail() || !valobj_sp)
-            return NULL;
+            return nullptr;
     }
     
-    ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(*valobj_sp.get()));
+    ObjCLanguageRuntime::ClassDescriptorSP descriptor(runtime->GetClassDescriptor(*valobj_sp));
     
-    if (!descriptor.get() || !descriptor->IsValid())
-        return NULL;
+    if (!descriptor || !descriptor->IsValid())
+        return nullptr;
     
     ConstString class_name_cs = descriptor->GetClassName();
     const char* class_name = class_name_cs.GetCString();
     
     if (!class_name || !*class_name)
-        return NULL;
+        return nullptr;
     
     if (!strcmp(class_name,"__NSSetI"))
     {
@@ -354,11 +354,11 @@ SyntheticChildrenFrontEnd* lldb_private:
 }
 
 lldb_private::formatters::NSSetISyntheticFrontEnd::NSSetISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_exe_ctx_ref(),
-m_ptr_size(8),
-m_data_32(NULL),
-m_data_64(NULL)
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_exe_ctx_ref(),
+    m_ptr_size(8),
+    m_data_32(nullptr),
+    m_data_64(nullptr)
 {
     if (valobj_sp)
         Update();
@@ -367,9 +367,9 @@ m_data_64(NULL)
 lldb_private::formatters::NSSetISyntheticFrontEnd::~NSSetISyntheticFrontEnd ()
 {
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
 }
 
 size_t
@@ -395,9 +395,9 @@ lldb_private::formatters::NSSetISyntheti
 {
     m_children.clear();
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
     m_ptr_size = 0;
     ValueObjectSP valobj_sp = m_backend.GetSP();
     if (!valobj_sp)
@@ -521,11 +521,11 @@ lldb_private::formatters::NSSetISyntheti
 }
 
 lldb_private::formatters::NSSetMSyntheticFrontEnd::NSSetMSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_exe_ctx_ref(),
-m_ptr_size(8),
-m_data_32(NULL),
-m_data_64(NULL)
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_exe_ctx_ref(),
+    m_ptr_size(8),
+    m_data_32(nullptr),
+    m_data_64(nullptr)
 {
     if (valobj_sp)
         Update ();
@@ -534,9 +534,9 @@ m_data_64(NULL)
 lldb_private::formatters::NSSetMSyntheticFrontEnd::~NSSetMSyntheticFrontEnd ()
 {
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
 }
 
 size_t
@@ -564,9 +564,9 @@ lldb_private::formatters::NSSetMSyntheti
     ValueObjectSP valobj_sp = m_backend.GetSP();
     m_ptr_size = 0;
     delete m_data_32;
-    m_data_32 = NULL;
+    m_data_32 = nullptr;
     delete m_data_64;
-    m_data_64 = NULL;
+    m_data_64 = nullptr;
     if (!valobj_sp)
         return false;
     if (!valobj_sp)
@@ -689,10 +689,11 @@ lldb_private::formatters::NSSetMSyntheti
 }
 
 lldb_private::formatters::NSOrderedSetSyntheticFrontEnd::NSOrderedSetSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
-SyntheticChildrenFrontEnd(*valobj_sp.get()),
-m_count(UINT32_MAX),
-m_children()
-{}
+    SyntheticChildrenFrontEnd(*valobj_sp),
+    m_count(UINT32_MAX),
+    m_children()
+{
+}
 
 size_t
 lldb_private::formatters::NSOrderedSetSyntheticFrontEnd::CalculateNumChildren ()

Modified: lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp Mon Feb 29 13:41:30 2016
@@ -61,6 +61,7 @@ ObjCLanguage::GetPluginNameStatic()
 //------------------------------------------------------------------
 // PluginInterface protocol
 //------------------------------------------------------------------
+
 lldb_private::ConstString
 ObjCLanguage::GetPluginName()
 {
@@ -76,6 +77,7 @@ ObjCLanguage::GetPluginVersion()
 //------------------------------------------------------------------
 // Static Functions
 //------------------------------------------------------------------
+
 Language *
 ObjCLanguage::CreateInstance (lldb::LanguageType language)
 {
@@ -192,7 +194,7 @@ ObjCLanguage::MethodName::GetClassNameWi
                 m_class_category.SetCStringWithLength (class_start, space_pos - class_start);
                 // If m_class hasn't been filled in and the class with category doesn't
                 // contain a '(', then we can also fill in the m_class
-                if (!m_class && strchr (m_class_category.GetCString(), '(') == NULL)
+                if (!m_class && strchr(m_class_category.GetCString(), '(') == nullptr)
                 {
                     m_class = m_class_category;
                     // No '(' was found in the full name, we can definitively say
@@ -732,7 +734,7 @@ ObjCLanguage::GetTypeScavenger ()
                     ConstString key_cs(key);
                     
                     if (clang_modules_decl_vendor->FindDecls(key_cs, false, UINT32_MAX, decls) > 0 &&
-                        decls.size() > 0)
+                        !decls.empty())
                     {
                         CompilerType module_type = ClangASTContext::GetTypeForDecl(decls.front());
                         result = true;

Modified: lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h?rev=262246&r1=262245&r2=262246&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h Mon Feb 29 13:41:30 2016
@@ -12,6 +12,7 @@
 
 // C Includes
 // C++ Includes
+#include <cstring>
 #include <vector>
 
 // Other libraries and framework includes
@@ -187,7 +188,7 @@ public:
         if (!name)
             return false;
             
-        if (strchr(name, ':') == NULL)
+        if (strchr(name, ':') == nullptr)
             return true;
         else if (name[strlen(name) - 1] == ':')
             return true;




More information about the lldb-commits mailing list