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

2021-07-23 Thread Alexey Utkin via Phabricator via cfe-commits
baramin added a comment.

We have a regression after the fix:
CPP-25899  CLion formatting 
does not match what clang-format produces

if

  AlignConsecutiveAssignments: Consecutive

Additional two spaces before `=` were added to indentation while formatting

  void SomeFunc()
  {
  using DcgmNs::Timelib::FromLegacyTimestamp;
  using DcgmNs::Timelib::ToLegacyTimestamp;
  using DcgmNs::Utils::GetMaxAge;
  using namespace std::chrono;
  newWatcher.maxAgeUsec   = ToLegacyTimestamp(GetMaxAge(
FromLegacyTimestamp(monitorFrequencyUsec), 
seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
  newWatcher.isSubscribed = subscribeForUpdates ? 1 : 0;
  }




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98214

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2021-07-23 Thread Alexey Utkin via Phabricator via cfe-commits
baramin added a comment.

You are right.

The problem is in

  FromLegacyTimestamp(monitorFrequencyUsec), 
seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));

line indentation. It is 6 instead of 4.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98214

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2021-07-23 Thread Alexey Utkin via Phabricator via cfe-commits
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(monitorFrequencyUsec), 
seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
  newWatcher.maxAge = ToLegacyTimestamp(GetMaxAge(
  FromLegacyTimestamp(monitorFrequencyUsec), 
seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
  newWatcher.max= ToLegacyTimestamp(GetMaxAge(
 FromLegacyTimestamp(monitorFrequencyUsec), 
seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
  }

Before:

  void SomeFunc() {
  newWatcher.maxAgeUsec = ToLegacyTimestamp(GetMaxAge(
  FromLegacyTimestamp(monitorFrequencyUsec), 
seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
  newWatcher.maxAge = ToLegacyTimestamp(GetMaxAge(
  FromLegacyTimestamp(monitorFrequencyUsec), 
seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
  newWatcher.max= ToLegacyTimestamp(GetMaxAge(
  FromLegacyTimestamp(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

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D106773: [clang-format] Fix aligning with linebreaks #2

2021-07-26 Thread Alexey Utkin via Phabricator via cfe-commits
baramin added a comment.

LGTM!
It solves my problem.
Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106773

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits