labath added a comment. I agree that we should start using this in a lot more places. I think you should be able to shorten the logging code a bit by using the LLDB_LOG_ERROR macro, which I've created for this purpose.
================ Comment at: source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp:335-340 + if (llvm::Error E = user_type_or_err.takeError()) { + std::string Reason = llvm::toString(std::move(E)); + if (log) + log->Printf("%s", Reason.c_str()); + return false; + } ---------------- How about: ``` if (!user_type_or_err) { LLDB_LOG_ERROR(log, user_type_or_err.takeError(), "{0}"); return false; } ``` https://reviews.llvm.org/D43912 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits