[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:19604 + + EXPECT_EQ("#pragma region TEST(FOO : BAR)", format("#pragma region TEST(FOO : BAR)", Style)); +} do we need to consider endregion at all? it would be nice to have

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-20 Thread Tobias Hieta via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG749fb33e82ff: [clang-format] Don't break lines after pragma region (authored by thieta). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. Thanks! LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125961/new/ https://reviews.llvm.org/D125961 __

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-20 Thread Tobias Hieta via Phabricator via cfe-commits
thieta updated this revision to Diff 430954. thieta added a comment. Removed comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125961/new/ https://reviews.llvm.org/D125961 Files: clang/lib/Format/FormatToken.h clang/lib/Format/TokenAnnotat

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-20 Thread Tobias Hieta via Phabricator via cfe-commits
thieta updated this revision to Diff 430953. thieta added a comment. Switched to unit test over lit test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125961/new/ https://reviews.llvm.org/D125961 Files: clang/lib/Format/FormatToken.h clang/lib

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. In D125961#3527452 , @thieta wrote: > In D125961#3527447 , @curdeius > wrote: > >> Thanks for the patch! >> Could you please add a unit test in unittest/Format/FormatTest.cpp instead >>

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-20 Thread Tobias Hieta via Phabricator via cfe-commits
thieta added a comment. In D125961#3527447 , @curdeius wrote: > Thanks for the patch! > Could you please add a unit test in unittest/Format/FormatTest.cpp instead of > in lit-based test/? > Is there a bug report that your patch fixes? Sure - I didn't kn

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-20 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested changes to this revision. curdeius added a comment. This revision now requires changes to proceed. Thanks for the patch! Could you please add a unit test in unittest/Format/FormatTest.cpp instead of in lit-based test/? Is there a bug report that your patch fixes? ===

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-19 Thread Tobias Hieta via Phabricator via cfe-commits
thieta added a comment. In D125961#3526347 , @wanders wrote: > There are other pragmas which include colon. How do they fare? > > Example > https://docs.microsoft.com/en-us/cpp/preprocessor/warning?view=msvc-170 > > #pragma warning( disable : 4507 34;

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-19 Thread Tobias Hieta via Phabricator via cfe-commits
thieta updated this revision to Diff 430882. thieta added a comment. Added additional tests to check other pragma statements Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125961/new/ https://reviews.llvm.org/D125961 Files: clang/lib/Format/Forma

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-19 Thread Anders Waldenborg via Phabricator via cfe-commits
wanders added a comment. There are other pragmas which include colon. How do they fare? Example https://docs.microsoft.com/en-us/cpp/preprocessor/warning?view=msvc-170 #pragma warning( disable : 4507 34; once : 4385; error : 164 ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D125961: [clang-format] Don't break lines after pragma region

2022-05-19 Thread Tobias Hieta via Phabricator via cfe-commits
thieta created this revision. Herald added a project: All. thieta requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We have autogenerated pragma regions in our code which where awkwardly broken up like this: #pragma region foo(bar : hello)