[Lldb-commits] [lldb] [lldb] refactor highlighting function for image lookup command (PR #76112)

José Lira Junior via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 19 08:49:00 PST 2024


junior-jl wrote:

> Maybe this is me being used to monster functions in lldb, but this one seems fine. At least the volume of code.
What you could do is "early return" (/early continue) in a couple of places to reduce the indentation.
> 1.   You could early return if there are no matches.
> 2.   You could continue if Symbol *symbol is nullptr.

> This turns it into mostly straight line code (and from there if you did want to break it into functions, it would be easier).

I see. But this would need to be in another PR, right? (checking to see if I'm understanding the flow of contribution)

https://github.com/llvm/llvm-project/pull/76112


More information about the lldb-commits mailing list