mgorny added inline comments.

================
Comment at: lldb/source/Host/common/XML.cpp:299-304
+  std::string text;
+  if (GetElementText(text) && llvm::to_integer(text,value, base))
+    return true;
+
+  value = fail_value;
+  return false;
----------------
labath wrote:
> /me wonders if it would be too weird to rely on the fact that to_integer does 
> not modify the result variable on failure.
> 
> It would definitely streamline this code:
> ```
> value = fail_value;
> return GetElementText(text) && llvm::to_integer(text,value, base);
> ```
Other code in LLDB already does that, so I suppose it's fine.


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

https://reviews.llvm.org/D110410

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

Reply via email to