Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting of call operator after init-list #2920

Merged
merged 1 commit into from Sep 22, 2020

Conversation

mwoehlke
Copy link
Collaborator

Correctly mark parentheses following a braced initializer list as a function call. (Specifically, this is invoking operator() of the just-constructed object.) Also, check for this when applying spaces so that we use sp_func_call_paren[_empty] rather than failing to match any rule and falling back to the default of always adding a space.

@mwoehlke
Copy link
Collaborator Author

Without this change, the output of the added test is:

auto x = foo{0} ();

(Note the incorrectly added space between } and ().)

Correctly mark parentheses following a braced initializer list as a
function call. (Specifically, this is invoking operator() of the
just-constructed object.) Also, check for this when applying spaces so
that we use sp_func_call_paren[_empty] rather than failing to match any
rule and falling back to the default of always adding a space.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 4145

  • 10 of 10 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 86.577%

Totals Coverage Status
Change from base Build 4141: 0.005%
Covered Lines: 19640
Relevant Lines: 22685

💛 - Coveralls

@gmaurel gmaurel merged commit e21b57d into uncrustify:master Sep 22, 2020
@mwoehlke mwoehlke deleted the fix-init-list-call branch September 23, 2020 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants