[PATCH] D75856: [clang-format] cleanup from D75517
This revision was automatically updated to reflect the committed changes. Closed by commit rGb28ed9cec8dd: [clang-format] cleanup from D75517 (authored by Jonathan Coe jb...@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)) 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)) ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D75856: [clang-format] cleanup from D75517
jbcoe updated this revision to Diff 249148. 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)) 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)) ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D75856: [clang-format] cleanup from D75517
krasimir requested changes to this revision. krasimir added a comment. This revision now requires changes to proceed. The new pre-merge checks are cool! Please clang-format the updated lines accordingly. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75856/new/ https://reviews.llvm.org/D75856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D75856: [clang-format] cleanup from D75517
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75856/new/ https://reviews.llvm.org/D75856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D75856: [clang-format] cleanup from D75517
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)) 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)) ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits