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

[clang-format] Changed formatting of trailing return type between version 18 and 19 #110911

Open
carlosgalvezp opened this issue Oct 2, 2024 · 2 comments
Labels
clang-format incomplete Issue not complete (e.g. missing a reproducer, build arguments, etc.)

Comments

@carlosgalvezp
Copy link
Contributor

Hi!

We are testing bumping our clang-format installation from version 18 to 19, and notice a fair amount of churn, without changing the config file. In particular, this type of code:

auto foo(Type a, 
         Type b) -> std::enable_if<....>
{}

Gets transformed into:

auto foo(Type a, Type b) 
    -> std::enable_if<...>
{}

Do you know if there's a newly added option that controls this behavior, or what could be the reason for this change?

Thanks!

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 2, 2024

@llvm/issue-subscribers-clang-format

Author: Carlos Galvez (carlosgalvezp)

Hi!

We are testing bumping our clang-format installation from version 18 to 19, and notice a fair amount of churn, without changing the config file. In particular, this type of code:

auto foo(Type a, 
         Type b) -&gt; std::enable_if&lt;....&gt;
{}

Gets transformed into:

auto foo(Type a, Type b) 
    -&gt; std::enable_if&lt;...&gt;
{}

Do you know if there's a newly added option that controls this behavior, or what could be the reason for this change?

Thanks!

@rymiel
Copy link
Member

rymiel commented Oct 2, 2024

You have to provide a config and the full lines of code (we don't need the whole file)

I suspect it might be related to e00d32a and 438ad9f and might already be fixed but we can't tell you unless you provide more info or unless you test on main

@owenca owenca added the incomplete Issue not complete (e.g. missing a reproducer, build arguments, etc.) label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-format incomplete Issue not complete (e.g. missing a reproducer, build arguments, etc.)
Projects
None yet
Development

No branches or pull requests

4 participants