diff options
author | Owen Pan <owenpiano@gmail.com> | 2023-08-24 01:13:05 -0700 |
---|---|---|
committer | Owen Pan <owenpiano@gmail.com> | 2023-08-24 01:27:24 -0700 |
commit | 91c4db00612b205c6d0f56990b657c5646ad2a3b (patch) | |
tree | 3280398fb113f169f43ae936fac9f875c15bcab9 /clang/lib/Format/WhitespaceManager.cpp | |
parent | 185bf56079255c7277686d2cd944664fe41e3bbb (diff) | |
download | llvm-91c4db00612b205c6d0f56990b657c5646ad2a3b.zip llvm-91c4db00612b205c6d0f56990b657c5646ad2a3b.tar.gz llvm-91c4db00612b205c6d0f56990b657c5646ad2a3b.tar.bz2 |
[clang-format][NFC] Replace !is() with isNot()
Differential Revision: https://reviews.llvm.org/D158571
Diffstat (limited to 'clang/lib/Format/WhitespaceManager.cpp')
-rw-r--r-- | clang/lib/Format/WhitespaceManager.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp index 61e59d0..04048ae 100644 --- a/clang/lib/Format/WhitespaceManager.cpp +++ b/clang/lib/Format/WhitespaceManager.cpp @@ -590,14 +590,14 @@ static unsigned AlignTokens(const FormatStyle &Style, F &&Matches, // A new line starts, re-initialize line status tracking bools. // Keep the match state if a string literal is continued on this line. - if (i == 0 || !Changes[i].Tok->is(tok::string_literal) || - !Changes[i - 1].Tok->is(tok::string_literal)) { + if (i == 0 || Changes[i].Tok->isNot(tok::string_literal) || + Changes[i - 1].Tok->isNot(tok::string_literal)) { FoundMatchOnLine = false; } LineIsComment = true; } - if (!Changes[i].Tok->is(tok::comment)) + if (Changes[i].Tok->isNot(tok::comment)) LineIsComment = false; if (Changes[i].Tok->is(tok::comma)) { @@ -731,10 +731,10 @@ void WhitespaceManager::alignConsecutiveMacros() { SpacesRequiredBefore = 0; } - if (!Current || !Current->is(tok::identifier)) + if (!Current || Current->isNot(tok::identifier)) return false; - if (!Current->Previous || !Current->Previous->is(tok::pp_define)) + if (!Current->Previous || Current->Previous->isNot(tok::pp_define)) return false; // For a macro function, 0 spaces are required between the @@ -781,7 +781,7 @@ void WhitespaceManager::alignConsecutiveMacros() { LineIsComment = true; } - if (!Changes[I].Tok->is(tok::comment)) + if (Changes[I].Tok->isNot(tok::comment)) LineIsComment = false; if (!AlignMacrosMatches(Changes[I])) |