diff options
| author | Konrad Kleine <kkleine@redhat.com> | 2019-05-23 11:14:47 +0000 |
|---|---|---|
| committer | Konrad Kleine <kkleine@redhat.com> | 2019-05-23 11:14:47 +0000 |
| commit | 248a13057a4adbdb8d511b1458daf39d01a4b520 (patch) | |
| tree | 1209fb0822f0c14237eb9935e30da465014a6eda /lldb/source/Target | |
| parent | 32d976bac194d78656974e3e05bf52997a06f509 (diff) | |
| download | bcm5719-llvm-248a13057a4adbdb8d511b1458daf39d01a4b520.tar.gz bcm5719-llvm-248a13057a4adbdb8d511b1458daf39d01a4b520.zip | |
[lldb] NFC modernize codebase with modernize-use-nullptr
Summary:
NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]]
This commit is the result of modernizing the LLDB codebase by using
`nullptr` instread of `0` or `NULL`. See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
for more information.
This is the command I ran and I to fix and format the code base:
```
run-clang-tidy.py \
-header-filter='.*' \
-checks='-*,modernize-use-nullptr' \
-fix ~/dev/llvm-project/lldb/.* \
-format \
-style LLVM \
-p ~/llvm-builds/debug-ninja-gcc
```
NOTE: There were also changes to `llvm/utils/unittest` but I did not
include them because I felt that maybe this library shall be updated in
isolation somehow.
NOTE: I know this is a rather large commit but it is a nobrainer in most
parts.
Reviewers: martong, espindola, shafik, #lldb, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits
Tags: #lldb, #llvm
Differential Revision: https://reviews.llvm.org/D61847
llvm-svn: 361484
Diffstat (limited to 'lldb/source/Target')
| -rw-r--r-- | lldb/source/Target/CPPLanguageRuntime.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Target/Process.cpp | 6 | ||||
| -rw-r--r-- | lldb/source/Target/SectionLoadHistory.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Target/StopInfo.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Target/ThreadPlanShouldStopHere.cpp | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/lldb/source/Target/CPPLanguageRuntime.cpp b/lldb/source/Target/CPPLanguageRuntime.cpp index ef120217005..70e5aee3e45 100644 --- a/lldb/source/Target/CPPLanguageRuntime.cpp +++ b/lldb/source/Target/CPPLanguageRuntime.cpp @@ -214,7 +214,7 @@ CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo( return llvm::Regex::escape(first_template_parameter.str()) + R"(::operator\(\)\(.*\))"; - if (symbol != NULL && + if (symbol != nullptr && symbol->GetName().GetStringRef().contains("__invoke")) { llvm::StringRef symbol_name = symbol->GetName().GetStringRef(); diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 2be3774d076..b018a3115a0 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -1425,7 +1425,7 @@ Status Process::ResumeSynchronous(Stream *stream) { Status error = PrivateResume(); if (error.Success()) { StateType state = - WaitForProcessToStop(llvm::None, NULL, true, listener_sp, stream); + WaitForProcessToStop(llvm::None, nullptr, true, listener_sp, stream); const bool must_be_alive = false; // eStateExited is ok, so this must be false if (!StateIsStoppedState(state, must_be_alive)) @@ -3638,7 +3638,7 @@ void Process::ControlPrivateStateThread(uint32_t signal) { } if (signal == eBroadcastInternalStateControlStop) { - thread_result_t result = NULL; + thread_result_t result = nullptr; m_private_state_thread.Join(&result); m_private_state_thread.Reset(); } @@ -3913,7 +3913,7 @@ thread_result_t Process::RunPrivateStateThread(bool is_secondary_thread) { // it was doing yet, so don't try to change it on the way out. if (!is_secondary_thread) m_public_run_lock.SetStopped(); - return NULL; + return nullptr; } // Process Event Data diff --git a/lldb/source/Target/SectionLoadHistory.cpp b/lldb/source/Target/SectionLoadHistory.cpp index 391a6c22f7f..ec16b58b445 100644 --- a/lldb/source/Target/SectionLoadHistory.cpp +++ b/lldb/source/Target/SectionLoadHistory.cpp @@ -97,7 +97,7 @@ SectionLoadList &SectionLoadHistory::GetCurrentSectionLoadList() { std::lock_guard<std::recursive_mutex> guard(m_mutex); SectionLoadList *section_load_list = GetSectionLoadListForStopID(eStopIDNow, read_only); - assert(section_load_list != NULL); + assert(section_load_list != nullptr); return *section_load_list; } diff --git a/lldb/source/Target/StopInfo.cpp b/lldb/source/Target/StopInfo.cpp index 8f0ab34dbd1..6db0c2b037e 100644 --- a/lldb/source/Target/StopInfo.cpp +++ b/lldb/source/Target/StopInfo.cpp @@ -1196,7 +1196,7 @@ StopInfo::GetCrashingDereference(StopInfoSP &stop_info_sp, address_loc += (sizeof(address_string) - 1); - uint64_t address = strtoull(address_loc, 0, 0); + uint64_t address = strtoull(address_loc, nullptr, 0); if (crashing_address) { *crashing_address = address; } diff --git a/lldb/source/Target/ThreadPlanShouldStopHere.cpp b/lldb/source/Target/ThreadPlanShouldStopHere.cpp index 111c5b4f611..a0b7072a107 100644 --- a/lldb/source/Target/ThreadPlanShouldStopHere.cpp +++ b/lldb/source/Target/ThreadPlanShouldStopHere.cpp @@ -130,7 +130,7 @@ ThreadPlanSP ThreadPlanShouldStopHere::DefaultStepFromHereCallback( "Queueing StepInRange plan to step through line 0 code."); return_plan_sp = current_plan->GetThread().QueueThreadPlanForStepInRange( - false, range, sc, NULL, eOnlyDuringStepping, status, + false, range, sc, nullptr, eOnlyDuringStepping, status, eLazyBoolCalculate, eLazyBoolNo); } } |

