Skip to content

Commit 48a31c8

Browse files
committed
[clang-format] Mark FormatToken::getPreviousNonComment() nodiscard. NFC.
1 parent f1cdeca commit 48a31c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Format/FormatToken.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ struct FormatToken {
693693
}
694694

695695
/// Returns the previous token ignoring comments.
696-
FormatToken *getPreviousNonComment() const {
696+
LLVM_NODISCARD FormatToken *getPreviousNonComment() const {
697697
FormatToken *Tok = Previous;
698698
while (Tok && Tok->is(tok::comment))
699699
Tok = Tok->Previous;

0 commit comments

Comments
 (0)