[PATCH] D75856: [clang-format] cleanup from D75517
Jonathan B Coe via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 9 09:41:18 PDT 2020
jbcoe created this revision.
jbcoe added a reviewer: krasimir.
jbcoe added a project: clang-format.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Fix typo in comment.
Add closing brace to test text.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75856
Files:
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTestCSharp.cpp
Index: clang/unittests/Format/FormatTestCSharp.cpp
===================================================================
--- clang/unittests/Format/FormatTestCSharp.cpp
+++ clang/unittests/Format/FormatTestCSharp.cpp
@@ -650,8 +650,13 @@
FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp);
// Do not format array subscript operators as attributes.
- verifyFormat(R"(if (someThings[index].Contains(myThing)) {)", Style);
- verifyFormat(R"(if (someThings[i][j][k].Contains(myThing)) {)", Style);
+ verifyFormat(R"(//
+if (someThings[index].Contains(myThing)) {
+})", Style);
+
+ verifyFormat(R"(//
+if (someThings[i][j][k].Contains(myThing)) {
+})", Style);
}
} // namespace format
Index: clang/lib/Format/TokenAnnotator.cpp
===================================================================
--- clang/lib/Format/TokenAnnotator.cpp
+++ clang/lib/Format/TokenAnnotator.cpp
@@ -373,7 +373,7 @@
if (Tok.Previous && Tok.Previous->is(tok::identifier))
return false;
- // Chains [] in of `identifier[i][j][k]` are not attributes.
+ // Chains of [] in `identifier[i][j][k]` are not attributes.
if (Tok.Previous && Tok.Previous->is(tok::r_square)) {
auto *MatchingParen = Tok.Previous->MatchingParen;
if (!MatchingParen || MatchingParen->is(TT_ArraySubscriptLSquare))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75856.249131.patch
Type: text/x-patch
Size: 1320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200309/707cd23c/attachment.bin>
More information about the cfe-commits
mailing list