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 | 412ed095f79b93cb63687150b292a1089a8c9854 (patch) | |
tree | 26ba2bd73730e134383f5e29cb13e0c261fe0828 /clang/lib/Format/Format.cpp | |
parent | 33cb84571f088f12154b7a86bd3d327de4bab269 (diff) | |
download | bcm5719-llvm-412ed095f79b93cb63687150b292a1089a8c9854.tar.gz bcm5719-llvm-412ed095f79b93cb63687150b292a1089a8c9854.zip |
[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
llvm-svn: 322956
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 88c90a865a8..0da0cea708c 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/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; |