[Lldb-commits] [PATCH] D136934: [lldb][FormatEntity][NFC] Move function argument parsing code into separate functions

Michael Buch via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 31 05:10:52 PDT 2022


Michael137 added inline comments.


================
Comment at: lldb/source/Core/FormatEntity.cpp:1057
+  // the arguments list
+  if (generic && open_paren && generic < open_paren) {
+    int generic_depth = 1;
----------------
labath wrote:
> aprantl wrote:
> > Would be nice to rewrite this on top of StringRef at some point.
> After we stop using this for c++, I think we should replace this code with something really simple (e.g., drop everything after the first `(`), and tell everyone to write their language plugins if they need more.
FYI @aprantl  we have a copy of all this in the Swift fork: https://github.com/apple/llvm-project/blob/next/lldb/source/Plugins/Language/Swift/SwiftLanguage.cpp#L1386

Curious whether some of that can be trimmed. Not familiar enough with Swift syntax to say for sure. But looks like some of it could be re-used from FormatEntity


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136934



More information about the lldb-commits mailing list