[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 9 16:47:12 PDT 2019
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
More information about the lldb-commits
mailing list