[PATCH] D42408: [clang-format] Align preprocessor comments with #
Krasimir Georgiev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 29 11:44:51 PST 2018
krasimir added inline comments.
================
Comment at: unittests/Format/FormatTest.cpp:2613
Style));
- // FIXME: The comment indent corrector in TokenAnnotator gets thrown off by
- // preprocessor indentation.
- EXPECT_EQ("#if 1\n"
- " // comment\n"
- "# define A 0\n"
- "// comment\n"
- "# define B 0\n"
- "#endif",
- format("#if 1\n"
- "// comment\n"
- "# define A 0\n"
- " // comment\n"
- "# define B 0\n"
- "#endif",
- Style));
+ // Keep comments aligned with #, otherwise indnet comments normally. These
+ // tests cannot use verifyFormat because messUp manipulates leading
----------------
s/indnet/indent
Repository:
rC Clang
https://reviews.llvm.org/D42408
More information about the cfe-commits
mailing list