Hi Linus,
The usual update for clang-format plus a requested C++ formatting change
(to align it with one of the C++ files we have).
Cheers,
Miguel
The following changes since commit 8f3d9f354286745c751374f5f1fcafee6b3f3136:
Linux 5.7-rc1 (2020-04-12 12:35:55 -0700)
are available in the Git repository at:
https://github.com/ojeda/linux.git tags/clang-format-for-linus-v5.7-rc3
for you to fetch changes up to 5d65a0218fee471e2cd512a8139ec857183b4721:
clang-format: Update with the latest for_each macro list (2020-04-18 13:49:33 +0200)
----------------------------------------------------------------
Two trivial clang-format changes:
- Don't indent C++ namespaces (Ian Rogers)
- The usual clang-format macro list update (Miguel Ojeda)
----------------------------------------------------------------
Ian Rogers (1):
clang-format: don't indent namespaces
Miguel Ojeda (1):
clang-format: Update with the latest for_each macro list
.clang-format | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
On Mon, Apr 20, 2020 at 12:09 PM Miguel Ojeda
<[email protected]> wrote:
>
> - Don't indent C++ namespaces (Ian Rogers)
I've taken this, since it doesn't matter, but I'm wondering at the
motivation for it (exactly because it shouldn't matter).
Linus
The pull request you sent on Mon, 20 Apr 2020 21:09:16 +0200:
> https://github.com/ojeda/linux.git tags/clang-format-for-linus-v5.7-rc3
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/20f16489093e90640a6a698d636f654a792806bd
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker
On Tue, Apr 21, 2020 at 12:10 PM Linus Torvalds
<[email protected]> wrote:
>
> On Mon, Apr 20, 2020 at 12:09 PM Miguel Ojeda
> <[email protected]> wrote:
> >
> > - Don't indent C++ namespaces (Ian Rogers)
>
> I've taken this, since it doesn't matter, but I'm wondering at the
> motivation for it (exactly because it shouldn't matter).
Hi Linus!
We (Google, Stephane Eranian, ..) have a tool that converts Intel's
topdown metrics:
https://download.01.org/perfmon/TMA_Metrics.xlsx
into the json format used for metrics in perf. It is written in C++
and we are planning to upstream it. In C++ there is preference for
anonymous namespaces over static functions and the namespace
indentation was pretty annoying for this. There's a little more
motivation in the commit message too.
Thanks,
Ian Rogers
> Linus
On Tue, Apr 21, 2020 at 2:03 PM Ian Rogers <[email protected]> wrote:
>
> We (Google, Stephane Eranian, ..) have a tool that converts Intel's
> topdown metrics:
> https://download.01.org/perfmon/TMA_Metrics.xlsx
> into the json format used for metrics in perf. It is written in C++
> and we are planning to upstream it.
Oh, ok.
> There's a little more motivation in the commit message too.
Well, not really. I _did_ check the commit message. It says nothing
very useful at all, in that the kernel doesn't use C++ (aside from a
couple of clang tests), so the commit message didn't at all clarify
why we should care about C++ namespace rules..
Linus
On Tue, Apr 21, 2020 at 11:17 PM Linus Torvalds
<[email protected]> wrote:
>
> Well, not really. I _did_ check the commit message. It says nothing
> very useful at all, in that the kernel doesn't use C++ (aside from a
> couple of clang tests)
Apart from what Ian said, one of those is tools/perf/util/c++/clang.{h,cpp}
which use `namespace perf` (with non-indented contents), which is why
I mentioned in the PR email that the change aligns clang-format to the
current usage.
But yeah, perhaps I should have edited the commit message rather than
say it in the email in passing.
Cheers,
Miguel