Skip to content

regression: nl_func_type_name / nl_func_proto_type_name always remove newline when return type is a reference #1360

Closed

Description

@dirk-thomas
  • This happens with the default uncrustify configuration: uncrustify --update-config-with-doc > default.cfg
  • Using the following input file:
class MyClass
{
// nl_func_proto_type_name = ignore is not being honored
int &
the_newline_after_the_return_type_is_removed();

// nl_func_type_name = ignore is not being honored
int &
the_newline_after_the_return_type_is_removed() {
}
};
  • In the generated output the newline between the return type int & and the function name the_newline_after_the_return_type_is_removed is removed:
...
int &the_newline_after_the_return_type_is_removed();
...
int &the_newline_after_the_return_type_is_removed() {
...
  • When using nl_func_type_name = ignore as well as nl_func_proto_type_name = ignore the expected output is unmodified compared to the input.
  • This is broken with the current master (31d385c).
  • It works with the last release (0.65).
  • After spending some time on bisecting the changes in between this is the breaking commit: 5fc1bd1 (the commit before 278b3a6 worked).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions