[clang] 0104f5e - [clang-format] Mark FormatToken::getNextNonComment() nodiscard. NFC.
Marek Kurdej via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 11 06:21:34 PST 2022
Author: Marek Kurdej
Date: 2022-02-11T15:20:11+01:00
New Revision: 0104f5efede22890c356810f992162a84cd615dd
URL: https://github.com/llvm/llvm-project/commit/0104f5efede22890c356810f992162a84cd615dd
DIFF: https://github.com/llvm/llvm-project/commit/0104f5efede22890c356810f992162a84cd615dd.diff
LOG: [clang-format] Mark FormatToken::getNextNonComment() nodiscard. NFC.
Added:
Modified:
clang/lib/Format/FormatToken.h
Removed:
################################################################################
diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h
index 6586ababd1e7b..4c03f436dde3e 100644
--- a/clang/lib/Format/FormatToken.h
+++ b/clang/lib/Format/FormatToken.h
@@ -687,7 +687,7 @@ struct FormatToken {
}
/// Returns the next token ignoring comments.
- const FormatToken *getNextNonComment() const {
+ LLVM_NODISCARD const FormatToken *getNextNonComment() const {
const FormatToken *Tok = Next;
while (Tok && Tok->is(tok::comment))
Tok = Tok->Next;
More information about the cfe-commits
mailing list