[llvm-bugs] [Bug 51183] New: Regression in continuation indent if `AlignConsecutiveAssignments: Consecutive`

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 23 08:56:08 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51183

            Bug ID: 51183
           Summary: Regression in continuation indent if
                    `AlignConsecutiveAssignments: Consecutive`
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: alexey.utkin at jetbrains.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

There is regression after the fix 
[clang-format] Fix aligning with linebreaks
c5243c63cda3c740d6e9c7e501f6518c21688da3:

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;
    // check the continuation indent: 6 instead of 4
    newWatcher.maxAgeUsec   = ToLegacyTimestamp(GetMaxAge(
          FromLegacyTimestamp<milliseconds>(monitorFrequencyUsec),
seconds(std::uint64_t(maxSampleAge)), maxKeepSamples));
    newWatcher.isSubscribed = subscribeForUpdates ? 1 : 0;
}

Here is original problem with attachments
CPP-25899 CLion formatting does not match what clang-format produces
https://youtrack.jetbrains.com/issue/CPP-25899

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210723/db6bc39b/attachment.html>


More information about the llvm-bugs mailing list