================
@@ -1241,19 +1240,23 @@ unsigned 
ContinuationIndenter::addTokenOnNewLine(LineState &State,
   switch (Style.BreakInheritanceList) {
   case FormatStyle::BILS_BeforeColon:
   case FormatStyle::BILS_AfterComma:
-    CurrentState.IsAligned = CurrentState.IsAligned ||
-                             Current.is(TT_InheritanceColon) ||
-                             Previous.is(TT_InheritanceComma);
+    if (Current.is(TT_InheritanceColon)) {
+      CurrentState.AlignedTo =
+          Current.getPreviousOneOf(tok::kw_class, tok::kw_struct);
+    } else if (Previous.is(TT_InheritanceComma)) {
+      CurrentState.AlignedTo =
+          Previous.getPreviousOneOf(tok::kw_class, tok::kw_struct);
----------------
HazardyKnusperkeks wrote:

For completeness add `tok::kw_union`.

https://github.com/llvm/llvm-project/pull/191217
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to