JDevlieghere added inline comments.

================
Comment at: lldb/source/Expression/DWARFExpression.cpp:2571
+      if (stack.size() < 1) {
+        if (error_ptr)
+          error_ptr->SetErrorString(
----------------
aprantl wrote:
> JDevlieghere wrote:
> > Can we wrap this in a lambda? 
> Which part specifically do you mean?
```auto SetErrorString = [&](llvm::StringRef msg) { if (error_ptr) 
error_ptr->SetErrorString(msg); })```

We could deduplicate even more code by using a macro that also covers the check 
around it and does the return, but I'm not sure if that's really worth it. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67369



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

Reply via email to