[PATCH] D82980: [NFC] Run clang-format on llvm-objcopy.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 7 00:09:09 PDT 2020


jhenderson added a comment.

In D82980#2133616 <https://reviews.llvm.org/D82980#2133616>, @rupprecht wrote:

> In D82980#2125967 <https://reviews.llvm.org/D82980#2125967>, @MaskRay wrote:
>
> > It is subjective but it seems to me that clang-format is making bad decisions for .td files. Many people don't format .td files (various lib/Target/*/*.td and include/clang/Driver/Options.td)
>
>
> The td formatting is less robust, but works well for simple CLI option files. I'm not particularly tied to the format it chooses, but I do find the options files easier to read when consistently formatted.
>
> The other td files you mentioned are much more complex, and I've tried using clang-format on them. It totally botches them and I don't think we should bother with complex files.
>
> > Formatting C++ files is fine but it seems that we run into some discrepancy between clang-format versions. Formatting with latest clang-format is probably fine.
>
> Yep
>
> In D82980#2127279 <https://reviews.llvm.org/D82980#2127279>, @jhenderson wrote:
>
> > No issue in principle with this, but we do need to figure out the canonical version of clang-format we want to use for this if we are going to do it. I have no personal opinion on it, but suspect my installed clang-format version is out-of-date, and that if I were to do the same thing you did I'd get different results.
>
>
> What does `clang-format --version` look like on your machine? The one on my machine seems to be updated on a rolling basis (built from trunk on a regular basis), but `sudo apt install clang-format-10` is available to use a more stable version.


I'm primarily a Windows-based developer, so don't expect me to be sudo-ing or apt-getting anything. I actually have 3 different clang-formats installed on my machine, it looks like, partly because it comes as part of our downstream toolchain installation package. The one that appears to be used under my most frequent usage is based on clang v8, since that seems to be the one tied to our Visual Studio extension that hooks it into the IDE, but I also have two v9 versions kicking around. I update the toolchain installation maybe once or at most twice a year, and there's usually some lag between that and the current LLVM version, so I'm always likely to be a year or two out-of-date.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82980/new/

https://reviews.llvm.org/D82980





More information about the llvm-commits mailing list