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

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 5 01:21:13 PST 2024


owenca wrote:

> > It does fix the example given.
> 
> #83400 has 6 real-world examples. This patch fixes none of them. It also has a reduced testcase, which this patch does fix. But fixing the reduced testcase without fixing the real-world examples is not fixing the bug.

You took what I said out of context. I'll reiterate it below:
> It does fix the example given. For other diffs involving user-defined types, the user need to use the TypeNames option. (If that doesn't work, a separate issue should be filed.)

So again, this patch fixes the test case that "reproduces the issue" (in the issue author's own words), and I already explained to you that the other 6 diffs (which are of the same construct, i.e. casting an address to a user-defined type in a macro definition) require the user to use the TypeNames option. (See the added test cases in fcae75ddb85e above.)

If the author of #83400 is still not satisfied, there's nothing to stop them from reopening the issue or filing a new issue. However, that's highly unlikely as they already expressed their view on it:
> But you can also see in the same PR https://github.com/godotengine/godot/pull/88959 that other cases where & is a bitwise operator were fixed by clang-format. I'm not sure there's any easy way for clang-format to know which is which, if so I understand if this is considered a "won't fix".

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


More information about the cfe-commits mailing list