[Lldb-commits] [lldb] Don't cause a premature UpdateIfNeeded when checking in SBValue::GetSP (PR #80222)

via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 31 16:29:16 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff a03a6e99647318a86ea398c42e241da43e3c550e c6d76783fce826f01fe4713e3cc58504d591aebf -- lldb/include/lldb/Core/ValueObject.h lldb/source/API/SBValue.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h
index db8023618b..e18ad3153a 100644
--- a/lldb/include/lldb/Core/ValueObject.h
+++ b/lldb/include/lldb/Core/ValueObject.h
@@ -461,7 +461,7 @@ public:
   // This gets the current error for this ValueObject, it may update the value
   // to ensure that the error is up to date.
   const Status &GetError();
-  
+
   // Check the current error state without updating the value:
   const Status &CheckError() { return m_error; }
 
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp
index 182ae669d8..1069ec0e42 100644
--- a/lldb/source/API/SBValue.cpp
+++ b/lldb/source/API/SBValue.cpp
@@ -117,7 +117,7 @@ public:
     if (!target) {
       // If we can't get the target, the error might still be useful:
       if (value_sp->CheckError().Fail())
-        return value_sp;      
+        return value_sp;
       return ValueObjectSP();
     }
     lock = std::unique_lock<std::recursive_mutex>(target->GetAPIMutex());

``````````

</details>


https://github.com/llvm/llvm-project/pull/80222


More information about the lldb-commits mailing list