================
@@ -497,66 +497,66 @@ bool FormatManager::ShouldPrintAsOneLiner(ValueObject
&valobj) {
for (size_t idx = 0; idx < *num_children; idx++) {
bool is_synth_val = false;
ValueObjectSP child_sp(valobj.GetChildAtIndex(idx));
- // something is wrong here - bail out
+ // Something is wrong here - bail out.
if (!child_sp)
return false;
- // also ask the child's type if it has any opinion
+ // Also ask the child's type if it has any opinion.
CompilerType child_compiler_type(child_sp->GetCompilerType());
if (child_compiler_type.IsValid()) {
switch (child_compiler_type.ShouldPrintAsOneLiner(child_sp.get())) {
case eLazyBoolYes:
- // an opinion of yes is only binding for the child, so keep going
+ // An opinion of yes is only binding for the child, so keep going,
case eLazyBoolCalculate:
break;
case eLazyBoolNo:
- // but if the child says no, then it's a veto on the whole thing
+ // but if the child says no, then it's a veto on the whole thing.
return false;
}
}
- // if we decided to define synthetic children for a type, we probably care
- // enough to show them, but avoid nesting children in children
+ // If we decided to define synthetic children for a type, we probably care
+ // enough to show them, but avoid nesting children in children.
if (child_sp->GetSyntheticChildren().get() != nullptr) {
ValueObjectSP synth_sp(child_sp->GetSyntheticValue());
- // wait.. wat? just get out of here..
+ // Bail out if there was an error.
if (!synth_sp)
return false;
- // but if we only have them to provide a value, keep going
+ // If we only have them to provide a value, keep going.
if (!synth_sp->MightHaveChildren() &&
synth_sp->DoesProvideSyntheticValue())
is_synth_val = true;
- else
+ // If there are synthetic children, the user probably wants to see them.
+ else if (synth_sp->MightHaveChildren())
return false;
}
total_children_name_len += child_sp->GetName().GetLength();
// 50 itself is a "randomly" chosen number - the idea is that
- // overly long structs should not get this treatment
+ // overly long structs should not get this treatment.
// FIXME: maybe make this a user-tweakable setting?
if (total_children_name_len > 50)
return false;
- // if a summary is there..
+ // If a summary is there...
if (child_sp->GetSummaryFormat()) {
- // and it wants children, then bail out
+ // and it wants children, then bail out.
if (child_sp->GetSummaryFormat()->DoesPrintChildren(child_sp.get()))
return false;
}
- // if this child has children..
+ // If this child has children,
----------------
JDevlieghere wrote:
Nit of nits: let's either stick to commas or ellipses, but not both.
https://github.com/llvm/llvm-project/pull/184926
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits