[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 3 11:55:46 PST 2024


owenca wrote:

> Another possibility to consider for the original bug: `(single_identifier)` is almost certainly a cast, not redundant parentheses, unless `single_identifier` names a macro argument. So I wonder if that would be a better heuristic to use to fix the regression.

I don’t think that would work as`(identifier)` can be a number of constructs depending on the context. It can be part of a function/macro call, function declaration, macro definition, C++ cast, C cast, `sizeof` operand, etc. 


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


More information about the cfe-commits mailing list