Author: Nathan Sidwell Date: 2024-08-01T15:29:27-04:00 New Revision: 18b58d42b2cba805ba4d34864d2e1e73e1610588
URL: https://github.com/llvm/llvm-project/commit/18b58d42b2cba805ba4d34864d2e1e73e1610588 DIFF: https://github.com/llvm/llvm-project/commit/18b58d42b2cba805ba4d34864d2e1e73e1610588.diff LOG: [clang-format] Rename variable more sensitively (#100943) Renaming to `Disallowed`. Added: Modified: clang/lib/Format/UnwrappedLineParser.cpp Removed: ################################################################################ diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index d406a531a5c0c..ed056b9dd5b75 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -2554,7 +2554,7 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) { const bool DoubleParens = Prev && Prev->is(tok::l_paren) && Next && Next->is(tok::r_paren); const auto *PrevPrev = Prev ? Prev->getPreviousNonComment() : nullptr; - const bool Blacklisted = + const bool Disallowed = PrevPrev && (PrevPrev->isOneOf(tok::kw___attribute, tok::kw_decltype) || (SeenEqual && @@ -2566,7 +2566,7 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType) { (!NestedLambdas.empty() && !NestedLambdas.back())) && Prev && Prev->isOneOf(tok::kw_return, tok::kw_co_return) && Next && Next->is(tok::semi); - if ((DoubleParens && !Blacklisted) || ReturnParens) { + if ((DoubleParens && !Disallowed) || ReturnParens) { LeftParen->Optional = true; FormatTok->Optional = true; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits