]> granicus.if.org Git - clang/commit
Make YAML quote forward slashes.
authorZachary Turner <zturner@google.com>
Fri, 12 Oct 2018 16:31:20 +0000 (16:31 +0000)
committerZachary Turner <zturner@google.com>
Fri, 12 Oct 2018 16:31:20 +0000 (16:31 +0000)
commit827d825a7badfbca6dd3b3a9a5aaa6823681c8dd
tree8c99d77939dba7c1e6399b12c69a9e1bc5d35df4
parent08bcf4115afc167bf6f5a9c921e9076fc1550d3d
Make YAML quote forward slashes.

If you have the string /usr/bin, prior to this patch it would not
be quoted by our YAML serializer.  But a string like C:\src would
be, due to the presence of a backslash.  This makes the quoting
rules of basically every single file path different depending on
the path syntax (posix vs. Windows).

While technically not required by the YAML specification to quote
forward slashes, when the behavior of paths is inconsistent it
makes it difficult to portably write FileCheck lines that will
work with either kind of path.

Differential Revision: https://reviews.llvm.org/D53169

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344359 91177308-0d34-0410-b5e6-96231b3b80d8
unittests/Tooling/DiagnosticsYamlTest.cpp
unittests/Tooling/ReplacementsYamlTest.cpp