diff options
author | Krasimir Georgiev <krasimir@google.com> | 2018-04-05 09:33:03 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2018-04-05 09:33:03 +0000 |
commit | 44e2e9f1c5b755001fe32319d1cf933b77c0aef8 (patch) | |
tree | 8c7bdb39fea70c71e60e30ea3fe46ef69ab848e5 /clang/unittests/Format/FormatTestProto.cpp | |
parent | abba04886e1443af1993d80002f0d50945292684 (diff) | |
download | bcm5719-llvm-44e2e9f1c5b755001fe32319d1cf933b77c0aef8.tar.gz bcm5719-llvm-44e2e9f1c5b755001fe32319d1cf933b77c0aef8.zip |
[clang-format] Preserve spaces before a percent in (text) protos
This makes sure that we do not change the meaning of pieces of text with
format specifiers.
llvm-svn: 329263
Diffstat (limited to 'clang/unittests/Format/FormatTestProto.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestProto.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp index 672fd5914d0..4b1480b074a 100644 --- a/clang/unittests/Format/FormatTestProto.cpp +++ b/clang/unittests/Format/FormatTestProto.cpp @@ -442,9 +442,11 @@ TEST_F(FormatTestProto, FormatsOptionsExtensions) { "};"); } -TEST_F(FormatTestProto, NoSpaceAfterPercent) { +TEST_F(FormatTestProto, SpacesAroundPercents) { verifyFormat("option (MyProto.options) = {\n" " key: %lld\n" + " key: 0x%04x\n" + " key: \"%d %d\"\n" "};"); } |