aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorOwen Pan <owenpiano@gmail.com>2025-02-26 18:14:26 -0800
committerGitHub <noreply@github.com>2025-02-26 18:14:26 -0800
commit2d585ccecc45d84483ce8a7e26dbf455e9ba3798 (patch)
tree86c39b787f10e1f1637882e5e12b8f9a72638988 /clang/lib/Format/UnwrappedLineParser.cpp
parentc8f70d7286db0eb54b001a6621a863b96c006e45 (diff)
downloadllvm-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.cpp6
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: