+1. One of the points I outlined on my list was to use llvm streams. So that also solves the problem On Thu, Sep 22, 2016 at 4:54 AM Pavel Labath <lab...@google.com> wrote:
> On 22 September 2016 at 01:00, Greg Clayton via lldb-commits > <lldb-commits@lists.llvm.org> wrote: > > If you use a StringRef in printf, please use "%*s" and then put the > count and data pointer into the printf, so the above line would become: > > > > + s->Printf("source regex = \"%*s\", exact_match = %d", > > + (int)m_regex.GetText().size(), m_regex.GetText().data(), > m_exact_match); > > I think this is a very good argument to use a c++-like api for > streams/logging: > > s << "source regex = \"" << m_regex.GetText() << "\", exact_match = " > << m_exact_match; > > It's shorter and much less error-prone. >
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits