[PATCH] D92753: [clang-format] Add IndentPragma style to eliminate common clang-format off scenario
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 7 07:46:04 PST 2020
curdeius added a comment.
Maybe it would be judicious to add a FIXME to `test::messUp` for the pragmas? Or fix it in this patch?
================
Comment at: clang/unittests/Format/FormatTest.cpp:17641-17651
+ verifyFormat("void foo() {\n"
+ " #pragma omp simd\n"
+ " for (...) {\n"
+ " #pragma omp simd\n"
+ " for (...) {\n"
+ " }\n"
+ " }\n"
----------------
Actually I'd rather see a test were you mess up spaces manually (adding or removing spaces on pragma lines).
So instead of `verifyFormat(formattedCode)`, I'd see `EXPECT_EQ(formattedCode, format(lightly-messed-up-code, Style)`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92753/new/
https://reviews.llvm.org/D92753
More information about the cfe-commits
mailing list