jgorbe marked 3 inline comments as done.
jgorbe added a comment.

Thanks for the review! Please take another look.



================
Comment at: lldb/include/lldb/DataFormatters/TypeCategory.h:76
+    uint32_t result = 0;
+    for (auto sc : m_subcontainers) {
+      result += sc->GetCount();
----------------
labath wrote:
> According to 
> <https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements>
>  this loop body should not use the `{}` braces.
Removed them (and also another similar set of braces in the constructor). 
Thanks!


================
Comment at: lldb/include/lldb/DataFormatters/TypeCategory.h:90
+    }
+    assert(false && "formatter index out of range");
+  }
----------------
labath wrote:
> Is this reachable from the SB API (perhaps via 
> `SBTypeCategory::GetXXXAtIndex`). If so, we'd want to do something different 
> here (return a default/empty value), or add a check somewhere in the SB layer.
Yes, it's reachable. Changed it to a default-initialized return value (which is 
a null shared_ptr).


================
Comment at: lldb/include/lldb/DataFormatters/TypeCategory.h:132
+    }
+    assert(false && "formatter index out of range");
   }
----------------
labath wrote:
> same question.
same answer :)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133910/new/

https://reviews.llvm.org/D133910

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to