[clang] [clang-format] Update goto label indentation styles (PR #180109)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 11 12:50:39 PST 2026
================
@@ -120,7 +120,14 @@ class LevelIndentTracker {
int getIndentOffset(const AnnotatedLine &Line) {
if (Style.isJava() || Style.isJavaScript() || Style.isCSharp())
return 0;
+
const auto &RootToken = *Line.First;
+
+ if (Style.IndentGotoLabels == FormatStyle::IGLS_HalfIndent &&
+ RootToken.Next != NULL && RootToken.Next->is(TT_GotoLabelColon)) {
----------------
Ezlanding1 wrote:
It also seems like your suggested change causes crashes. Perhaps you meant `RootToken.Next` rather than `!RootToken.Next`?
https://github.com/llvm/llvm-project/pull/180109
More information about the cfe-commits
mailing list