Log the AST of the TU associated with LLDB's expr command, once a declaration
Why not if (Log* log_ast = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_AST))
You can use the LLDB_LOG macro which provides a much nicer interface.
Sure, changed that.
Ok thanks for pointing it out. Changed to use it.
The macro uses llvm's format library, so you can omit the calls to .cstr().
LGTM outside of Jonas's comments.