[PATCH] D136336: [clang-format] Mark pragma region lines as StringLiterals
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 25 12:47:09 PDT 2022
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)) {
CurrentToken->setType(TT_ImplicitStringLiteral);
----------------
This shouldn't be here. There is no closing brace for this, or am I missing something?
================
Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:653
+TEST_F(TokenAnnotatorTest, UnderstandsPragmaRegion) {
+ // Everything after #pragma region should be ImplicitStringLiteral
+ auto Tokens = annotate("#pragma region Foo(Bar: Hello)");
----------------
Maybe you can add that in a additional commit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136336/new/
https://reviews.llvm.org/D136336
More information about the cfe-commits
mailing list