diff options
author | Kazu Hirata <kazu@google.com> | 2022-01-09 00:19:47 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-01-09 00:19:47 -0800 |
commit | 40446663c73831f166c4432edb2997d88fd167a9 (patch) | |
tree | aab09c69baaed6d7db2d82ae84f4708f44b1dc15 /clang/lib/Parse/ParseDecl.cpp | |
parent | 4cd768ed5e735da5f97be22c6da9483a39e20f3d (diff) | |
download | llvm-40446663c73831f166c4432edb2997d88fd167a9.zip llvm-40446663c73831f166c4432edb2997d88fd167a9.tar.gz llvm-40446663c73831f166c4432edb2997d88fd167a9.tar.bz2 |
[clang] Use true/false instead of 1/0 (NFC)
Identified with modernize-use-bool-literals.
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index dd2da77..76e9081 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -3080,7 +3080,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, ParsedAttributesWithRange attrs(AttrFactory); // We use Sema's policy to get bool macros right. PrintingPolicy Policy = Actions.getPrintingPolicy(); - while (1) { + while (true) { bool isInvalid = false; bool isStorageClass = false; const char *PrevSpec = nullptr; @@ -4271,7 +4271,7 @@ void Parser::ParseStructDeclaration( // Read struct-declarators until we find the semicolon. bool FirstDeclarator = true; SourceLocation CommaLoc; - while (1) { + while (true) { ParsingFieldDeclarator DeclaratorInfo(*this, DS); DeclaratorInfo.D.setCommaLoc(CommaLoc); @@ -5580,7 +5580,7 @@ void Parser::ParseTypeQualifierListOpt( SourceLocation EndLoc; - while (1) { + while (true) { bool isInvalid = false; const char *PrevSpec = nullptr; unsigned DiagID = 0; @@ -6272,7 +6272,7 @@ void Parser::ParseDirectDeclarator(Declarator &D) { if (D.hasName() && !D.getNumTypeObjects()) MaybeParseCXX11Attributes(D); - while (1) { + while (true) { if (Tok.is(tok::l_paren)) { bool IsFunctionDeclaration = D.isFunctionDeclaratorAFunctionDeclaration(); // Enter function-declaration scope, limiting any declarators to the |