[clang] [clang-format] treat continuation as indent for aligned lines (PR #191217)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 11 13:11:33 PDT 2026


================
@@ -21,6 +21,22 @@
 namespace clang {
 namespace format {
 
+static const FormatToken &getLineStart(const FormatToken &Tok) {
+  const FormatToken *Result = &Tok;
+  while (Result->getDecision() != FormatDecision::FD_Break && Result->Previous)
+    Result = Result->Previous;
+  return *Result;
+}
+
+static unsigned indentLevelFor(WhitespaceManager::Change const &C,
----------------
HazardyKnusperkeks wrote:

```suggestion
static unsigned indentLevelFor(const WhitespaceManager::Change &C,
```

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


More information about the cfe-commits mailing list