[Lldb-commits] [PATCH] D136761: [lldb][FormatEntity] Fix closing parenthesis for function.name-with-args frame format

Michael Buch via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 26 06:59:48 PDT 2022


Michael137 added inline comments.


================
Comment at: lldb/source/Core/FormatEntity.cpp:1673
                 if (open_paren)
-                  close_paren = strchr(open_paren, ')');
+                  close_paren = strrchr(open_paren, ')');
               } else
----------------
labath wrote:
> What if there are multiple function arguments? Won't this find the end of the last one?
Had a local test-case that worked iirc. A well-formed demangled function name always has a final closing parenthesis after all the function arguments. So unless I missed something it should find the last parenthesis correctly

I will add a test-case for this to make sure


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136761



More information about the lldb-commits mailing list