[all-commits] [llvm/llvm-project] cd2b05: [clang-format] spacesRequiredBetween is not honour...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Mon Jan 3 03:19:40 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd2b050fa4995b75b9c36fae16c0d9f105b67585
      https://github.com/llvm/llvm-project/commit/cd2b050fa4995b75b9c36fae16c0d9f105b67585
  Author: mydeveloperday <mydeveloperday at gmail.com>
  Date:   2022-01-03 (Mon, 03 Jan 2022)

  Changed paths:
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] spacesRequiredBetween is not honouring clang-format off/on

https://github.com/llvm/llvm-project/issues/52881

It seems that clang-format off/on is not being honoured in regard to adding spaces.

My understanding of clang-format off/on is that it marks the token as finalized based on whether formatting is currently enabled or disabled.

This was causing a space to be added between the `<` and `<<`  in the Cuda kernel `foo<<<1, 1>>>();`

This if doesn't solve this actual issue but ensure that clang-format is at least honoured.

Reviewed By: curdeius, owenpan

Differential Revision: https://reviews.llvm.org/D116494




More information about the All-commits mailing list