[PATCH] D17549: [PATCH] More UTF string conversion wrappers

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 15:34:09 PST 2016


On Tue, Mar 8, 2016 at 3:28 PM Cameron <cameron at moodycamel.com> wrote:

> cameron314 added inline comments.
>
> ================
> Comment at: llvm/trunk/lib/Support/CommandLine.cpp:793
> @@ +792,3 @@
> +  if (!llvm::ConvertUTF8toWide(envVar, wenvVar)) {
> +    assert(false);
> +    return;
> ----------------
> aaron.ballman wrote:
> > Can you turn them into `assert(false && "Message about what went
> wrong");`?
> Will do.
>
> ================
> Comment at: llvm/trunk/lib/Support/ConvertUTFWrapper.cpp:190
> @@ +189,3 @@
> +  const UTF8 *ErrorPtr;
> +  if (!ConvertUTF8toWide(sizeof(wchar_t), Source, ResultPtr, ErrorPtr))
> +  {
> ----------------
> aaron.ballman wrote:
> > You should run clang-format over this as well, the formatting isn't
> correct (here and elsewhere in the file).
> Will do. I was hoping to avoid this since clang-format changes a lot of
> code that was already present as well. I'll extract just the parts that
> apply to my patch, I suppose.
>

1. Find the script git-clang-format in your llvm/tools/clang repo.
2. Add its directory to your PATH.
3. Check in all your changes so that your patch is a single squashed commit
at tip of trunk
4. run `git clang-format HEAD~1`

That should format only lines you modified.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160308/b3e1a1b1/attachment.html>


More information about the llvm-commits mailing list