labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

I am quite happy about how this is turning out to be. Thanks for taking your 
time to do this.



================
Comment at: 
lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp:36-53
+namespace lldb_private {
+namespace python {
+template <> Expected<bool> As<bool>(Expected<PythonObject> &&obj) {
+  if (obj) {
+    return obj.get().IsTrue();
+  } else {
+    return obj.takeError();
----------------
llvm style is to not put `else` after a return 
<http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return>. 
Also, for short statements like this, I'd omit braces. And lastly, in line with 
the "keep namespaces small" philosophy I think you should define these as 
`template<> ... python::As<long long>(...)` :)


================
Comment at: 
lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp:1092-1096
+  if (m_repr_bytes) {
+    return PyBytes_AS_STRING(m_repr_bytes);
+  } else {
+    return "unknown exception";
+  }
----------------
no else after return, no braces


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68547



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

Reply via email to