diff options
author | Emilia Kond <emilia@rymiel.space> | 2024-01-12 03:47:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-12 03:47:37 +0200 |
commit | 791637e78236541a871f9474e0c8918354ca310f (patch) | |
tree | 5763763776bff9022cb4a526f9ec83f569c6ddf9 /llvm/lib/Support/StringRef.cpp | |
parent | 17c062c0c5624b19cd99237bb5fffe37de8aa623 (diff) | |
download | llvm-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