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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 26 06:45:01 PDT 2022


labath added a comment.

Wow, another name parser I knew nothing about. :/

I'm probably being naive, but I don't suppose there's an easy a way to reuse/repurpose the parser in the C++ language plugin for this (?) This is the first time I see this code, so it's hard to construct counter-examples, but I'd be surprised if this is correct.



================
Comment at: lldb/source/Core/FormatEntity.cpp:1673
                 if (open_paren)
-                  close_paren = strchr(open_paren, ')');
+                  close_paren = strrchr(open_paren, ')');
               } else
----------------
What if there are multiple function arguments? Won't this find the end of the last one?


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