[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals

2022-10-26 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1345 while (CurrentToken) { -if (IsMark || CurrentToken->Previous->is(TT_BinaryOperator)) +if (IsMarkOrRegion || CurrentToken->Previous->is(TT_BinaryOperator)) { Curre

[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals

2022-10-25 Thread Tobias Hieta via Phabricator via cfe-commits
thieta added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1345 while (CurrentToken) { -if (IsMark || CurrentToken->Previous->is(TT_BinaryOperator)) +if (IsMarkOrRegion || CurrentToken->Previous->is(TT_BinaryOperator)) { Curren

[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals

2022-10-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1345 while (CurrentToken) { -if (IsMark || CurrentToken->Previous->is(TT_BinaryOperator)) +if (IsMarkOrRegion || CurrentToken->Previous->is(TT_BinaryOperator)) {

[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals

2022-10-25 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 rGfd1d93db7106: [clang-format] Mark pragma region lines as StringLiterals (authored by thieta). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals

2022-10-24 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136336/new/ https://reviews.llvm.org/D136336 _

[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals

2022-10-24 Thread Tobias Hieta via Phabricator via cfe-commits
thieta updated this revision to Diff 470380. thieta added a comment. git clang-format removed accidental include Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136336/new/ https://reviews.llvm.org/D136336 Files: clang/lib/Format/TokenAnnotator.cp

[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals

2022-10-24 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Can you run git-clang-format? Comment at: clang/lib/Format/TokenAnnotator.cpp:1340 Keywords.kw_region)) { - bool IsMark = CurrentToken->is(Keywords.kw_mark); + bool IsMarkOrRegion = CurrentToken->isOneOf(Keywords

[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals

2022-10-24 Thread Tobias Hieta via Phabricator via cfe-commits
thieta added a comment. In D136336#3877238 , @owenpan wrote: > Can you add a test to `TokenAnnotatorTest.cpp`? Thanks for the review. Fixed it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136336/new/ ht

[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals

2022-10-24 Thread Tobias Hieta via Phabricator via cfe-commits
thieta updated this revision to Diff 470092. thieta added a comment. Added TokenAnnotatorTest and removed reduntant FormatTests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136336/new/ https://reviews.llvm.org/D136336 Files: clang/lib/Format/To

[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals

2022-10-22 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Can you add a test to `TokenAnnotatorTest.cpp`? Comment at: clang/unittests/Format/FormatTest.cpp:19973-19974 + verifyFormat("#pragma region TEST(FOO: NOSPACE)", Style); + EXPECT_EQ("#pragma region TEST(FOO: NOSPACE)", +format("#pragma reg

[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals

2022-10-20 Thread Tobias Hieta via Phabricator via cfe-commits
thieta created this revision. thieta added reviewers: MyDeveloperDay, curdeius, owenpan. Herald added a project: All. thieta requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In our code-base we auto-generate pragma regions the regions look l