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