Skip to content

Commit 0a037c6

Browse files
authored
Revert "[NFC] Avoid potential null dereference. (#126872)"
This reverts commit f8c7457.
1 parent 1435c8e commit 0a037c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Format/UnwrappedLineFormatter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ static auto computeNewlines(const AnnotatedLine &Line,
16101610
if (Line.startsWith(TT_NamespaceRBrace)) {
16111611
if (Style.WrapNamespaceBodyWithEmptyLines == FormatStyle::WNBWELS_Never)
16121612
Newlines = 1;
1613-
else if (PreviousLine && !PreviousLine->startsWith(TT_NamespaceRBrace))
1613+
else if (!PreviousLine->startsWith(TT_NamespaceRBrace))
16141614
Newlines = std::max(Newlines, 2u);
16151615
}
16161616
}

0 commit comments

Comments
 (0)