[PATCH] D49851: [clang-tidy] run-clang-tidy add synchronisation to the output

Artur Ryt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 10:29:27 PDT 2018


R2RT reopened this revision.
R2RT added a comment.
This revision is now accepted and ready to land.

Hey, all, as for me it seems that this commit introduced a few problems with Python3 (at least 3.7)

  sys.stdout.write(' '.join(invocation) + '\n' + output + '\n')
  TypeError: can only concatenate str (not "bytes") to str

Then

      if err > 0:
  TypeError: '>' not supported between instances of 'bytes' and 'int'

Then

  sys.stderr.write(err + '\n')
  TypeError: can't concat str to bytes

Given the code:

After fixes:

  with lock:
    sys.stdout.write(' '.join(invocation) + '\n' + str(output) + '\n')
    if err:
      sys.stderr.write(str(err) + '\n')
  queue.task_done()

But I propose to use


Repository:
  rL LLVM

https://reviews.llvm.org/D49851





More information about the llvm-commits mailing list