thakis added a comment.

In D111890#3090653 <https://reviews.llvm.org/D111890#3090653>, @mgorny wrote:

> In D111890#3090632 <https://reviews.llvm.org/D111890#3090632>, @thakis wrote:
>
>> This causes lots of warnings on Windows, where TERMIOS is false: 
>> http://45.33.8.238/win/47744/step_4.txt (look for "Terminal.cpp"). Could you 
>> take a look? It looks like return statements are genuinely missing there.
>
> When `LLDB_ENABLE_TERMIOS` is false, `GetData()` always returns an error, so 
> the code below should not be reachable. I suppose I could add 
> `llvm_unreachable()` for that. I'll try that and make a diff if it works.

Maybe it'd be easier to read if you move

  return llvm::createStringError(llvm::inconvertibleErrorCode(),
                                 "termios support missing in LLDB");

into some function and then do

  llvm::Error Terminal::SetCanonical(bool enabled) {
  #if LLDB_ENABLE_TERMIOS
    ...actual body...
  #else
    return ThatErrorFunction();
  #endif
  ``
  
  (etc) in all the functions instead of hiding it in GetData()? Then it's 
obvious in every function what's going on.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111890

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

Reply via email to