=?utf-8?q?José?= L. Junior <[email protected]>,taalhaataahir0102
 <[email protected]>,taalhaataahir0102 
<[email protected]>,taalhaataahir0102
 <[email protected]>,taalhaataahir0102 <[email protected]>,
=?utf-8?q?José?= L. Junior <[email protected]>,
=?utf-8?q?José?= L. Junior <[email protected]>,
=?utf-8?q?José?= L. Junior <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


DavidSpickett wrote:

> Is it better if I declared llvm::StringRef ansi_prefix and llvm::StringRef 
> ansi_suffix outside the conditions even if they are not used?

As far as I can tell, that's how you must do it, or at least, one of the 
simpler ways.

You could do:
```
      s->PutCStringColorHighlighted(symbol->GetName().GetStringRef(), pattern,
             target_sp ? target_sp->GetDebugger().GetRegexMatchAnsiPrefix() : 
"", 
             target_sp ? target_sp->GetDebugger().GetRegexMatchAnsiSuffix() : 
"");
```

If you prefer. There's not much difference to it. One puts it all in a single 
call which is good because the scope of the values is limited. The other has 1 
conditional instead of two.

Leave it as is. Sounds like you will end up refactoring it anyway.

https://github.com/llvm/llvm-project/pull/69422
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to