[PATCH] D97688: clang-format: use `ph` as a canonical raw string delimiter for google style
Krasimir Georgiev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 1 07:52:38 PST 2021
krasimir updated this revision to Diff 327120.
krasimir added a comment.
clang-format: use `pb` as a canonical raw string delimiter for google style
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97688/new/
https://reviews.llvm.org/D97688
Files:
clang/lib/Format/ContinuationIndenter.cpp
clang/lib/Format/Format.cpp
Index: clang/lib/Format/Format.cpp
===================================================================
--- clang/lib/Format/Format.cpp
+++ clang/lib/Format/Format.cpp
@@ -1135,7 +1135,7 @@
"ParseTestProto",
"ParsePartialTestProto",
},
- /*CanonicalDelimiter=*/"",
+ /*CanonicalDelimiter=*/"pb",
/*BasedOnStyle=*/"google",
},
};
Index: clang/lib/Format/ContinuationIndenter.cpp
===================================================================
--- clang/lib/Format/ContinuationIndenter.cpp
+++ clang/lib/Format/ContinuationIndenter.cpp
@@ -1651,7 +1651,7 @@
StringRef OldDelimiter = *getRawStringDelimiter(Current.TokenText);
StringRef NewDelimiter =
getCanonicalRawStringDelimiter(Style, RawStringStyle.Language);
- if (NewDelimiter.empty() || OldDelimiter.empty())
+ if (NewDelimiter.empty())
NewDelimiter = OldDelimiter;
// The text of a raw string is between the leading 'R"delimiter(' and the
// trailing 'delimiter)"'.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97688.327120.patch
Type: text/x-patch
Size: 1032 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210301/a9610ac1/attachment.bin>
More information about the cfe-commits
mailing list