aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/StringRef.cpp
diff options
context:
space:
mode:
authorEmilia Kond <emilia@rymiel.space>2024-01-12 03:47:37 +0200
committerGitHub <noreply@github.com>2024-01-12 03:47:37 +0200
commit791637e78236541a871f9474e0c8918354ca310f (patch)
tree5763763776bff9022cb4a526f9ec83f569c6ddf9 /llvm/lib/Support/StringRef.cpp
parent17c062c0c5624b19cd99237bb5fffe37de8aa623 (diff)
downloadllvm-791637e78236541a871f9474e0c8918354ca310f.zip
llvm-791637e78236541a871f9474e0c8918354ca310f.tar.gz
llvm-791637e78236541a871f9474e0c8918354ca310f.tar.bz2
[clang-format] Don't allow casts in front of ampamp (#77704)
clang-format performs a heuristic to see if a right parenthesis is the parenthesis of a cast expression. This check never looked ahead to see if the next token is an ampamp && token. This resulted in the paren being set as an CastRParen, and the following ampamp got annotated as an UnaryOperator! Since && can never be a unary operator is standard C++, this patch forbids the right paren from ever becoming a cast. Fixes https://github.com/llvm/llvm-project/issues/77680
Diffstat (limited to 'llvm/lib/Support/StringRef.cpp')
0 files changed, 0 insertions, 0 deletions