[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-08-02 Thread Andy Yankovsky via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG307b1fddd4d8: [clang-tidy] Always open files using UTF-8 encoding (authored by werat). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-08-02 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev accepted this revision. kbobyrev added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106792/new/ https://reviews.llvm.org/D106792

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-08-02 Thread Andy Yankovsky via Phabricator via cfe-commits
werat updated this revision to Diff 363413. werat added a comment. Moved the comment to the first usage of `io.open`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106792/new/ https://reviews.llvm.org/D106792 Files: clang-tools-extra/clang-tidy/

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev requested changes to this revision. kbobyrev added a comment. This revision now requires changes to proceed. It's certainly doable but looks like a complete overkill for this kind of problem :) The patch is fine, I'm okay with landing it if you're expecting similar problem to arise in t

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-29 Thread Andy Yankovsky via Phabricator via cfe-commits
werat added a comment. In D106792#2912955 , @kbobyrev wrote: > Honestly, I don't really think we should have more Unicode symbols in the > docs for generators I'm not very familiar with the documentation build process, but maybe we could enforce only-A

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Makes sense, thank you for the explanation. I've changed the problematic doc but this is probably still fine. Honestly, I don't really think we should have more Unicode symbols in the docs for generators hence this patch might not be needed but I'd be OK if you really

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-29 Thread Andy Yankovsky via Phabricator via cfe-commits
werat updated this revision to Diff 362678. werat added a comment. Fix incorrect replace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106792/new/ https://reviews.llvm.org/D106792 Files: clang-tools-extra/clang-tidy/add_new_check.py clang-tool

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-29 Thread Andy Yankovsky via Phabricator via cfe-commits
werat updated this revision to Diff 362677. werat added a comment. Use `io.open` explicitly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106792/new/ https://reviews.llvm.org/D106792 Files: clang-tools-extra/clang-tidy/add_new_check.py clang-

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-29 Thread Andy Yankovsky via Phabricator via cfe-commits
werat added a comment. > Hi! Thanks for the patch, it makes sense to me! Honestly, I think having the > open shadow is maybe not the best way to solve this (please feel free to let > me know if there are reasons it would be better), maybe spell it out > explicitly (there aren't that many cases

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. > For example, right now > clang-tools-extra/docs/clang-tidy/checks/abseil-no-internal-dependencies.rst > has non-ASCII quotes Also, hm... Do we really need these? It's safe to remove those, this shouldn't be a problem, I think. Repository: rG LLVM Github Monorepo

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Hi! Thanks for the patch, it makes sense to me! Honestly, I think having the `open` shadow is maybe not the best way to solve this (please feel free to let me know if there are reasons it would be better), maybe spell it out explicitly (there aren't that many cases of

[PATCH] D106792: [clang-tidy] Always open files using UTF-8 encoding

2021-07-26 Thread Andy Yankovsky via Phabricator via cfe-commits
werat created this revision. Herald added a subscriber: xazax.hun. werat requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. The encoding used for opening files depends on the OS and might be different from UTF-8 (e.g. on Windows it