[Lldb-commits] [PATCH] D156447: [lldb] Split CTF parsing and type creation (NFC)

Michael Buch via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 27 14:33:53 PDT 2023


Michael137 added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/CTF/CTFTypes.h:108
+          uint32_t size, std::vector<Value> values)
+      : CTFType(eEnum, uid, name), nelems(nelems), size(size) {
+    assert(values.size() == nelems);
----------------
JDevlieghere wrote:
> Michael137 wrote:
> > did you omit this by accident?
> Yes, good eye. I need to see why my test didn't catch this. 
(also to add to the suggestion, probably best to use `this->values.size()` in the assert below to avoid a use-after-move; not sure which `values` takes precedence)


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

https://reviews.llvm.org/D156447



More information about the lldb-commits mailing list