[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


================
@@ -4828,7 +4834,11 @@ void UnwrappedLineParser::readToken(int LevelDifference) {
           PPBranchLevel > 0) {
         Line->Level += PPBranchLevel;
       }
-      flushComments(isOnNewLine(*FormatTok));
+
+      if (!UnBracedBodyDepth) {
----------------
HazardyKnusperkeks wrote:

Omit the braces.

https://github.com/llvm/llvm-project/pull/94776


More information about the cfe-commits mailing list