[PATCH] D80301: [yaml][clang-tidy] Fix new line YAML serialization

Dmitry Polukhin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 19 09:12:44 PDT 2020


DmitryPolukhin added a comment.

It looks like there is no support for the proposed solution so I found alternative solution that might be even better. We can use double quotation `"` for multiline strings. It solves problem because in case of double quotation LLVM escapes new line like `\n` so there is no need to double newlines. Escaped newlines can be parsed correctly by other YAML parsers like pyyaml. BTW, LLVM YAML reading also has issue with not removing leading spaces for multiline strings so multiline strings serialised by pyyaml with single quotation cannot be parsed correctly by clang-apply-replacements. With double quotation it seems to work fine in both directions.

What do you think about using double quotation for multiline strings?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80301/new/

https://reviews.llvm.org/D80301





More information about the llvm-commits mailing list