[PATCH] D94955: [clang-format] Treat ForEachMacros as loops

2021-01-25 Thread Jiashu Zou via Phabricator via cfe-commits
GoBigorGoHome added a comment. Comment at: clang/unittests/Format/FormatTest.cpp:995 TEST_F(FormatTest, ForEachLoops) { verifyFormat("void f() {\n" + " foreach (Item *item, itemlist) {\n" MyDeveloperDay wrote: > I'd like you to assert that s

[PATCH] D94955: [clang-format] Treat ForEachMacros as loops

2021-02-01 Thread Jiashu Zou via Phabricator via cfe-commits
GoBigorGoHome updated this revision to Diff 320426. GoBigorGoHome added a comment. Update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94955/new/ https://reviews.llvm.org/D94955 Files: clang/docs/ReleaseNotes.rst clang/lib/Format/Unwrap

[PATCH] D94955: [clang-format] Treat ForEachMacros as loops

2021-02-02 Thread Jiashu Zou via Phabricator via cfe-commits
GoBigorGoHome added a comment. @MyDeveloperDay I changed the `verifyFormat` to `EXPECT_NE` because I don't know the proper way "to show that the previous tests were wrong", and I agree with you that it is a dirty hack. However, I think it is already clear why the tests were changed, that was b

[PATCH] D94955: [clang-format] Treat ForEachMacros as loops

2021-01-19 Thread Jiashu Zou via Phabricator via cfe-commits
GoBigorGoHome created this revision. GoBigorGoHome added a reviewer: MyDeveloperDay. GoBigorGoHome requested review of this revision. Herald added a project: clang. TT_ForEachMacro should be considered in rules AllowShortBlocksOnASingleLine and AllowShortLoopsOnASingleLine. This fixes bug-46087.

[PATCH] D94955: [clang-format] Treat ForEachMacros as loops

2021-01-20 Thread Jiashu Zou via Phabricator via cfe-commits
GoBigorGoHome updated this revision to Diff 317794. GoBigorGoHome added a comment. Update Clang release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94955/new/ https://reviews.llvm.org/D94955 Files: clang/docs/ReleaseNotes.rst clang/lib