[PATCH] D75856: [clang-format] cleanup from D75517
Phabricator via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 9 10:47:12 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb28ed9cec8dd: [clang-format] cleanup from D75517 (authored by Jonathan Coe <jbcoe at google.com>).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75856/new/
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,15 @@
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.249158.patch
Type: text/x-patch
Size: 1352 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200309/e6e93431/attachment-0001.bin>
More information about the cfe-commits
mailing list