diff options
author | Owen Pan <owenpiano@gmail.com> | 2025-02-26 18:14:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-26 18:14:26 -0800 |
commit | 2d585ccecc45d84483ce8a7e26dbf455e9ba3798 (patch) | |
tree | 86c39b787f10e1f1637882e5e12b8f9a72638988 /clang/lib/Format/UnwrappedLineParser.cpp | |
parent | c8f70d7286db0eb54b001a6621a863b96c006e45 (diff) | |
download | llvm-2d585ccecc45d84483ce8a7e26dbf455e9ba3798.zip llvm-2d585ccecc45d84483ce8a7e26dbf455e9ba3798.tar.gz llvm-2d585ccecc45d84483ce8a7e26dbf455e9ba3798.tar.bz2 |
[clang-format] Fix a bug that changes keyword `or` to an identifier (#128410)
Fixes #105482
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 57ddd80..16f19e9 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -1712,12 +1712,6 @@ void UnwrappedLineParser::parseStructuralElement( OpeningBrace && OpeningBrace->isOneOf(TT_RequiresExpressionLBrace, TT_CompoundRequirementLBrace); !eof();) { - if (IsCpp && FormatTok->isCppAlternativeOperatorKeyword()) { - if (auto *Next = Tokens->peekNextToken(/*SkipComment=*/true); - Next && Next->isBinaryOperator()) { - FormatTok->Tok.setKind(tok::identifier); - } - } const FormatToken *Previous = FormatTok->Previous; switch (FormatTok->Tok.getKind()) { case tok::at: |