[llvm-bugs] [Bug 31664] New: Strange formatting for continuation with AlignConsecutiveAssignments without assignment

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 16 20:15:41 PST 2017


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

            Bug ID: 31664
           Summary: Strange formatting for continuation with
                    AlignConsecutiveAssignments without assignment
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Roland.Schulz at Intel.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org
    Classification: Unclassified

With config:
AlignConsecutiveDeclarations: true

Input:
gmx_bool     bGStatEveryStep, bGStat, bCalcVir, bCalcEnerStep, bCalcEner;
gmx_bool     bNS, bNStList, bSimAnn, bStopCM, bRerunMD, bFirstStep,
  startingFromCheckpoint, bInitStep, bLastStep=FALSE, bBornRadii,
  bUsingEnsembleRestraints;

Produces:
gmx_bool bGStatEveryStep, bGStat, bCalcVir, bCalcEnerStep, bCalcEner;
gmx_bool bNS, bNStList, bSimAnn, bStopCM, bRerunMD, bFirstStep,
    startingFromCheckpoint, bInitStep, bLastStep = FALSE, bBornRadii,
                                       bUsingEnsembleRestraints;

It seems inconsistent that for continuation lines only declarations with
assignment are taken into account. Either continuation should always be aligned
to the first declaration or they should always use the ContinuationIndentWidth.
I would prefer the first option.

-- 
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/20170117/f06aed46/attachment.html>


More information about the llvm-bugs mailing list