Skip to content

Commit aba5557

Browse files
schittirjoaosaffran
authored andcommitted
Revert "[NFC] Avoid potential null dereference." (llvm#127228)
Reverts llvm#126872 The commit, though harmless, is unnecessary.
1 parent 83c2ede commit aba5557

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)