[Lldb-commits] [lldb] r282079 - Make lldb::Regex use StringRef.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 22 05:10:05 PDT 2016
+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 <labath at google.com> wrote:
> On 22 September 2016 at 01:00, Greg Clayton via lldb-commits
> <lldb-commits at 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160922/55229139/attachment.html>
More information about the lldb-commits
mailing list