If a header contains a declaration myFunc(char const *str); then autogenerating the definition in the source file creates myFunc(const char *str) { } . I think it would be better if the generated signature exactly matched the header, even if "char const" and "const char" are equivalent. Also, it would be nice if it were possible to set the { to appear on the same line as the ).
This would also be useful for trailing return types. For example 'auto max(int a, int b) -> int' auto completes to 'int max(int a, int b)'.
Generated code is not derived from the textual representation of declarations or typed-in code, but from libclang's code model. That is, matching the declaration or the typed-in code in specific ways (`const char` vs `char const` or keeping the trailing return type) requires separate specific implementations. Generated code is then formatted with currently configured source formatter style. Most formatters/styles don't reorder `const` or affect the trailing return type. Feel free to implement the features you need and create merge requests at https://invent.kde.org/kdevelop/kdevelop/-/merge_requests