[clang] [clang-format] NEVER allow && to be an unary operator. (PR #78852)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 21 12:10:29 PST 2024


HazardyKnusperkeks wrote:

> #61233
> 
> The ambiguities this syntax extension can bring are pretty much impossible or at least very hard to handle correctly with how we're currently parsing things, but I'll try to avoid breaking things which weren't already broken.

But that is misformatted right now. I'd go with the named tokens, maybe a few more that wouldn't be valid C++ and then try to handle other cases as they appear, and some one is willing to implement.

We shouldn't break the formatting of this addition intentionally, if we can easily support the standard cases (casting a pointer to `uint32_t` is at least not portable). But focus on standard C++ where `&&` is currently either the logical and, a r-value ref qualifier or a forwarding reference qualifier.

https://github.com/llvm/llvm-project/pull/78852


More information about the cfe-commits mailing list