Skip to content
Unverified Commit fa6025e2 authored by Emilia Kond's avatar Emilia Kond Committed by GitHub
Browse files

[clang-format] Don't confuse initializer equal signs in for loops (#77712)

clang-format has logic to align declarations of multiple variables of
the same type, aligning them at the equals sign. This logic is applied
in for loops as well. However, this alignment logic also erroneously
affected the equals signs of designated initializers.

This patch forbids alignment if the token 2 tokens back from the equals
sign is a designated initializer period.

Fixes https://github.com/llvm/llvm-project/issues/73902
parent 4821c90c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment