[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
Loading
Please sign in to comment