================
@@ -1694,8 +1694,11 @@ void 
ContinuationIndenter::moveStatePastFakeLParens(LineState &State,
     // Special case for generic selection expressions, its comma-separated
     // expressions are not aligned to the opening paren like regular calls, but
     // rather continuation-indented relative to the _Generic keyword.
-    if (Previous && Previous->endsSequence(tok::l_paren, tok::kw__Generic))
-      NewParenState.Indent = CurrentState.LastSpace;
+    if (Previous && Previous->endsSequence(tok::l_paren, tok::kw__Generic) &&
+        State.Stack.size() >= 2) {
+      NewParenState.Indent =
+          State.Stack.end()[-2].Indent + Style.ContinuationIndentWidth;
----------------
owenca wrote:

To be consistent with the other dozen similar sinppets:
```suggestion
        State.Stack.size() > 1) {
      NewParenState.Indent =
          State.Stack[State.Stack.size() - 2].Indent + 
Style.ContinuationIndentWidth;
```

https://github.com/llvm/llvm-project/pull/79785
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to