[llvm-commits] Remove redundant c_str() calls in the clang code base

Manuel Klimek klimek at google.com
Tue May 24 19:45:19 PDT 2011


The attached patch was automatically generated by the example tool for
review in: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20110523/042163.html
(contributed by Marcin, cc'ed).

This brought up a use of ConstantArray::get in the clang codebase that
was based on an older implementation of the interface, but fixed by
calling .c_str() after appending a null-byte to a string and handing
it to a StringRef. I deleted the outdated comment on the
implementation of get(), as the comment in the header nicely explains
the correct (and up-to-date) behavior.

Cheers,
/Manuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-remove-redundant-cstr.patch
Type: text/x-patch
Size: 9627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110524/adb8aea9/attachment.bin>


More information about the llvm-commits mailing list