[Lldb-commits] [PATCH] D80254: Prevent GetNumChildren from transitively walking pointer chains

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 20 03:12:58 PDT 2020

labath added a comment.

Looks fine to me too. The way this test is phrased, it would probably make more sense under `test/API/python_api/value`, than here. (I mean, it's not technically wrong because everything is a "functionality", but i'd like to avoid putting stuff here precisely because the category is so vague.)

Comment at: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:5228
   case clang::Type::RValueReference: {
     const clang::ReferenceType *reference_type =
teemperor wrote:
> If you feel like refactoring this (by deleting code): You can also just delete all this and add the `RValueReference` and `LValueReference` to the `ObjCObjectPointer` above. `GetPointeeType` there is doing the same as the lines below and handles all ptrs/references. But that's optional.
+1 for merging this stuff

Comment at: lldb/test/API/functionalities/pointer_num_children/main.cpp:13-14
+  Outer outer{&inner};
+  auto Ptr = &(outer.inner);
+  auto &Ref = outer.inner;
+  return 0; // break here
Since this test doesn't deal with `auto` in any way, I think we should just follow the llvm style guide here and spell out the type explicitly.



More information about the lldb-commits mailing list