[clang] Add configuration option PenaltyBreakBeforeMemberAccess (PR #118409)

Gedare Bloom via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 15:10:38 PST 2024


================
@@ -4280,7 +4280,7 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line,
     //   aaaaaaa
     //       .aaaaaaaaa.bbbbbbbb(cccccccc);
     return !Right.NextOperator || !Right.NextOperator->Previous->closesScope()
-               ? 150
+               ? Style.PenaltyBreakBeforeMemberAccess
                : 35;
----------------
gedare wrote:

I'm not sure if anything should be done about this `35`. I briefly considered using `Style.PenaltyBreakBeforeMemberAccess - 115`.

https://github.com/llvm/llvm-project/pull/118409


More information about the cfe-commits mailing list