shafik added inline comments.

================
Comment at: clang/lib/AST/Interp/Descriptor.cpp:126
+  auto CtorSub = [=](unsigned SubOff, Descriptor *F, bool IsBase,
+                     bool Recurse = true) {
     auto *Desc = reinterpret_cast<InlineDescriptor *>(Ptr + SubOff) - 1;
----------------
To recurse or not seems to be a property of whether the base is virtual or not.

Maybe a enum w/ `Base` and `Virtual` base would be better and then the logic of 
whether to recurse can be kept local to the lambda,


================
Comment at: clang/lib/AST/Interp/Descriptor.cpp:147
   for (const auto &V : D->ElemRecord->virtual_bases())
-    CtorSub(V.Offset, V.Desc, /*isBase=*/true);
+    CtorSub(V.Offset, V.Desc, /*isBase=*/true, false);
 }
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137562

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D137562: [clang][I... Timm Bäder via Phabricator via cfe-commits
    • [PATCH] D137562: [cla... Shafik Yaghmour via Phabricator via cfe-commits

Reply via email to