Unverified Commit 2c5d7a88 authored by Jannik Silvanus's avatar Jannik Silvanus Committed by GitHub
Browse files

[clang-format] Remove YAML hack to emit a BasedOnStyle comment (#89228)

When serializing a formatting style to YAML, we were emitting a comment
`# BasedOnStyle: <style>` if the serialized formatting style matches one
of the known styles. This is useful, but mis-uses the YAML API.

An upcoming change to fix keys with special characters by quoting them
breaks this,
and will emit a non-comment **key** `'# BasedOnStyle': <style>` instead.
(https://github.com/llvm/llvm-project/pull/88763)

Thus, remove this hack. There doesn't seem to be a specific use for it,
and it is not tested.

If we want the comment back, we should add comment support to the YAML writer,
and use that instead.
parent 2125080f
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment