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

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 23 10:02:42 PDT 2021


MyDeveloperDay added a comment.

In D98214#2900371 <https://reviews.llvm.org/D98214#2900371>, @baramin wrote:

> We have a regression after the fix:
> CPP-25899 <https://youtrack.jetbrains.com/issue/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<milliseconds>(monitorFrequencyUsec), seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
>       newWatcher.isSubscribed = subscribeForUpdates ? 1 : 0;
>   }

At first glance this looks correct to me, `newWatcher.maxAgeUsec   =` and `newWatcher.isSubscribed =` are considered consecutive. Am I missing something?


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