[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 7 12:39:57 PDT 2024
================
@@ -796,6 +796,24 @@ TEST_F(FormatTestComments, ParsesCommentsAdjacentToPPDirectives) {
format("namespace {}\n /* Test */ #define A"));
}
+
+TEST_F(FormatTestComments, DeIdentsCommentBeforeIfdefAfterBracelessIf) {
+ EXPECT_EQ("void f() {\n"
----------------
HazardyKnusperkeks wrote:
Please use `verifyFormat`, I know this file is not a good example, but there are some usages already.
https://github.com/llvm/llvm-project/pull/94776
More information about the cfe-commits
mailing list