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;


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to