[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
Tue Dec 8 01:58:29 PST 2020
curdeius added inline comments.
================
Comment at: clang/unittests/Format/FormatTest.cpp:17676-17684
+ format("void foo() {\n"
+ "#if 1\n"
+ " #pragma omp simd\n"
+ " for (int k = 0; k < 10; k++) {\n"
+ " #pragma omp simd\n"
+ " for (int j = 0; j < 10; j++) {\n"
+ " }\n"
----------------
MyDeveloperDay wrote:
> curdeius wrote:
> > Last nit, I'd mess up spaces like suggested here.
> This is `BeforeHash` not `AfterHash`, I think the test is correct (as it passes)
Ok. My thought was that we were not really checking that this patch will correctly reformat pragmas that are not yet on correct columns, but after your change to remove messUp=false, we do test it.
Again, LGTM! And thank you for the patch (and the patience) :).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92753/new/
https://reviews.llvm.org/D92753
More information about the cfe-commits
mailing list