[Lldb-commits] [lldb] [lldb] Fix up comment placement (NFC) (PR #200671)
via lldb-commits
lldb-commits at lists.llvm.org
Sun May 31 09:29:16 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Dave Lee (kastiglione)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/200671.diff
1 Files Affected:
- (modified) lldb/source/Commands/CommandObjectFrame.cpp (+4-4)
``````````diff
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 742f7026464f0..5c79d758bafd7 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -731,6 +731,10 @@ may even involve JITing and running code in the target program.)");
valobj_sp = frame->GetValueForVariableExpressionPath(
entry.ref(), m_varobj_options.use_dynamic, expr_path_options,
var_sp, error);
+ // Check only the `error` argument, because doing
+ // `valobj_sp->GetError()` will update the value and potentially
+ // return a new error that happens during the update, even if
+ // `GetValueForVariableExpressionPath` reported no errors.
if (valobj_sp && error.Success()) {
result.GetValueObjectList().Append(valobj_sp);
@@ -770,10 +774,6 @@ may even involve JITing and running code in the target program.)");
break;
}
if (!found_recognized) {
- // Check only the `error` argument, because doing
- // `valobj_sp->GetError()` will update the value and potentially
- // return a new error that happens during the update, even if
- // `GetValueForVariableExpressionPath` reported no errors.
if (error.Fail())
result.SetError(error.takeError());
else
``````````
</details>
https://github.com/llvm/llvm-project/pull/200671
More information about the lldb-commits
mailing list