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:
> Michael137 wrote:
> > 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
> Ok, I see. Given your description above, I believe this will work OK. 
> However, I suspect it will go wrong in the part where it tries skip over the 
> template arguments (and gets confused by things like `operator<<` and `foo<(2 
> > 1)>`).
Good catch with the `operator<<`. Indeed this solution wouldn't quite work. 
Added a test for this


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136761

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to