diff options
author | Krasimir Georgiev <krasimir@google.com> | 2018-01-19 16:18:47 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2018-01-19 16:18:47 +0000 |
commit | 7de2463761513b86190efd16d94e4a620bc1f73d (patch) | |
tree | 24397159d328b9447680a67dafa4ee6710df3482 /lib/Format/Format.cpp | |
parent | ce000e5010562b3bcf2ba60e3f40709cde3b6a70 (diff) |
[clang-format] Adds a canonical delimiter to raw string formatting
Summary:
This patch adds canonical delimiter support to the raw string formatting.
This allows matching delimiters to be updated to the canonical one.
Reviewers: bkramer
Reviewed By: bkramer
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D42187
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 88c90a865a..0da0cea708 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -459,6 +459,7 @@ template <> struct MappingTraits<FormatStyle::RawStringFormat> { IO.mapOptional("Language", Format.Language); IO.mapOptional("Delimiters", Format.Delimiters); IO.mapOptional("EnclosingFunctions", Format.EnclosingFunctions); + IO.mapOptional("CanonicalDelimiter", Format.CanonicalDelimiter); IO.mapOptional("BasedOnStyle", Format.BasedOnStyle); } }; @@ -713,6 +714,7 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { "PARSE_TEXT_PROTO", "ParseTextProto", }, + /*CanonicalDelimiter=*/"", /*BasedOnStyle=*/"google", }}; GoogleStyle.SpacesBeforeTrailingComments = 2; |