summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/FormatToken.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/FormatToken.h')
-rw-r--r--clang/lib/Format/FormatToken.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h
index 056d4bdd1bb..a0214631844 100644
--- a/clang/lib/Format/FormatToken.h
+++ b/clang/lib/Format/FormatToken.h
@@ -109,7 +109,7 @@ struct FormatToken {
StartsBinaryExpression(false), EndsBinaryExpression(false),
OperatorIndex(0), LastOperator(false),
PartOfMultiVariableDeclStmt(false), IsForEachMacro(false),
- MatchingParen(NULL), Previous(NULL), Next(NULL),
+ MatchingParen(nullptr), Previous(nullptr), Next(nullptr),
Decision(FD_Unformatted), Finalized(false) {}
/// \brief The \c Token.
@@ -354,7 +354,7 @@ struct FormatToken {
/// \brief Returns the previous token ignoring comments.
FormatToken *getPreviousNonComment() const {
FormatToken *Tok = Previous;
- while (Tok != NULL && Tok->is(tok::comment))
+ while (Tok && Tok->is(tok::comment))
Tok = Tok->Previous;
return Tok;
}
@@ -362,7 +362,7 @@ struct FormatToken {
/// \brief Returns the next token ignoring comments.
const FormatToken *getNextNonComment() const {
const FormatToken *Tok = Next;
- while (Tok != NULL && Tok->is(tok::comment))
+ while (Tok && Tok->is(tok::comment))
Tok = Tok->Next;
return Tok;
}
OpenPOWER on IntegriCloud