[Lldb-commits] [PATCH] D131983: [LLDB][NFC] Fix optons parsing and misc. reliability in CommandObjectThread

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 17 01:50:27 PDT 2022


labath added inline comments.


================
Comment at: lldb/source/Commands/CommandObjectThread.cpp:66
+      case 'c':
+        if (option_arg.getAsInteger(0, m_count) || (m_count < 0)) {
           m_count = UINT32_MAX;
----------------
fixathon wrote:
> hawkinsw wrote:
> > Hope this doesn't screw up Phabricator, but I just wanted to confirm with @clayborg that, yes, that is specified: 
> > 
> > http://eel.is/c++draft/expr.log.and
> Thanks for your review and posting the link to the spec!
There is an `llvm::to_integer`. One of the motivations for it was to change the awkwardness to the getAsInteger return value. It hasn't taken the world by storm because it wasn't followed by a conversion of a critical mass of call sites, but you should feel free to use it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131983



More information about the lldb-commits mailing list