aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Tooling/RefactoringTest.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-07-12 04:51:31 +0000
committerFangrui Song <maskray@google.com>2019-07-12 04:51:31 +0000
commit27ed1c5bb80c8da317cd80bdd50cb22189d1c6fb (patch)
treefa9f57c557e4bbd583dff780ec9a1a5a3e00ea66 /clang/unittests/Tooling/RefactoringTest.cpp
parent320d6795b29efee3f5d47e2c88dcd74d621e482f (diff)
downloadllvm-27ed1c5bb80c8da317cd80bdd50cb22189d1c6fb.zip
llvm-27ed1c5bb80c8da317cd80bdd50cb22189d1c6fb.tar.gz
llvm-27ed1c5bb80c8da317cd80bdd50cb22189d1c6fb.tar.bz2
[YAMLIO] Remove trailing spaces when outputting maps
llvm::yaml::Output::paddedKey unconditionally outputs spaces, which are superfluous if the value to be dumped is a sequence or map. Change `bool NeedsNewLine` to `StringRef Padding` so that it can be overridden to `\n` if the value is a sequence or map. An empty map/sequence is special. It is printed as `{}` or `[]` without a newline, while a non-empty map/sequence follows a newline. To handle this distinction, add another variable `PaddingBeforeContainer` and does the special handling in endMapping/endSequence. Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D64566 llvm-svn: 365869
Diffstat (limited to 'clang/unittests/Tooling/RefactoringTest.cpp')
0 files changed, 0 insertions, 0 deletions