summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestProto.cpp
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2018-04-05 09:33:03 +0000
committerKrasimir Georgiev <krasimir@google.com>2018-04-05 09:33:03 +0000
commit44e2e9f1c5b755001fe32319d1cf933b77c0aef8 (patch)
tree8c7bdb39fea70c71e60e30ea3fe46ef69ab848e5 /clang/unittests/Format/FormatTestProto.cpp
parentabba04886e1443af1993d80002f0d50945292684 (diff)
downloadbcm5719-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.cpp4
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"
"};");
}
OpenPOWER on IntegriCloud