Before line comments were not touched at all with ColumnLimit == 0, so this is a real change. But at least for me it was unexpected that the comments were not fixed with ColumnLimit == 0.
|40 ms||x64 debian > Flang.Semantics::resolve102.f90|
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/flang/test/Semantics/test_errors.sh /mnt/disks/ssd0/agent/llvm-project/flang/test/Semantics/resolve102.f90 /mnt/disks/ssd0/agent/llvm-project/build/tools/flang/test/Semantics/Output/resolve102.f90.tmp /mnt/disks/ssd0/agent/llvm-project/build/bin/f18 -intrinsic-module-directory /mnt/disks/ssd0/agent/llvm-project/build/tools/flang/include/flang
|140 ms||x64 windows > lld.MachO::rename.s|
Script: -- : 'RUN: at line 2'; rm -fr C:\ws\w16n2-1\llvm-project\premerge-checks\build\tools\lld\test\MachO\Output\rename.s.tmp
It seems to be a bug indeed.
So, basically all the changes are just adding a bunch of conditions on ColumnLimit != 0 which is a special value meaning "no limit", right? Or have I missed something?
Thining out loud... wouldn't it be easier to change ColumnLimit from 0 to numeric_limits<unsigned>::max() just before these transformations?
Is this condition on ColumnLimit (and other below) working ok when ColumnLimit == 0? Do your tests cover it?
I must admit, that I don't know for sure.
But I think your proposal of using ::max() is sound and should be used.