I've had similar problems, which is why I found this thread. Unfortunately, I can see it's really just you streaming your journey through this problem without much help from the community. I suggest you supply some more information about your project.
It appears you are trying to compile a C file and are specifically talking about C headers. Have you tried looking at the preprocessor output? I once had the exact same problem and I discovered that my function name corresponded to a macro definition in some standard header. My function name was StrLength, so my function name was replaced by "int" in the preprocessor output. I added #undef StrLength and everything compiled fine.
In your case, your example is void func(...). Is that literally your code or is the function name something else? I suggest you include actual code if you the best help.
Is you project entirely comprised of only C files? Are you using Objective C? Are you bridging Objective C and Swift?
In my project, I have low level code in C. Then a layer of Objective C on top of that. Then Swift code for my model on top of that. Finally, there's SwiftUI code that uses the Swift model. In order to mix the Objective C and Swift, I needed a bridging header. I was getting hundreds of phantom errors at one point, even though my builds were successful. Turns out that it was related to the SwiftUI previews, which also are compiling the same code in its own builds.
I solved this problem by including more header files in the bridging file. I had included only the Objective C headers because the C headers were all included indirectly. I explicitly added all of the C headers and my phantom errors went away.
Believe me, I know how frustrating this can be! But you might get more help by providing more information about your project and supplying more actual source code.