[clang] [clang-format] Fix a bug in annotating function declaration names (PR #76206)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 28 02:51:32 PST 2023


HazardyKnusperkeks wrote:

> > `clang-format` doesn't know what are types, except for the keywords. So there is no way to decide if this is a function declaration without naming the parameters, or a variable declaration with a constructor call.
> 
> This is C so I guess it can only be a function declaration. Anyway, it's minor to work around, thanks again.

This boils down to, that for `clang-format` C doesn't exist. It's all parsed as C++.

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


More information about the cfe-commits mailing list