[PATCH] D98214: [clang-format] Fix aligning with linebreaks

Alexey Utkin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 23 13:39:30 PDT 2021


baramin added a comment.

This is true.
 .clang-format:

  Language:        Cpp
  AlignConsecutiveAssignments: Consecutive
  BinPackArguments: false
  BinPackParameters: false
  ColumnLimit:     120
  ConstructorInitializerIndentWidth: 4
  ContinuationIndentWidth: 4
  IndentWidth:     4
  TabWidth:        4
  UseCRLF:         false
  UseTab:          Never

Format, that looks like a regression for me:
Now:

  void SomeFunc() {
      newWatcher.maxAgeUsec = ToLegacyTimestamp(GetMaxAge(
          FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec), seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
      newWatcher.maxAge     = ToLegacyTimestamp(GetMaxAge(
              FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec), seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
      newWatcher.max        = ToLegacyTimestamp(GetMaxAge(
                 FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec), seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
  }

Before:

  void SomeFunc() {
      newWatcher.maxAgeUsec = ToLegacyTimestamp(GetMaxAge(
          FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec), seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
      newWatcher.maxAge     = ToLegacyTimestamp(GetMaxAge(
          FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec), seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
      newWatcher.max        = ToLegacyTimestamp(GetMaxAge(
          FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec), seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98214



More information about the cfe-commits mailing list