[PATCH] D135422: Fix clang-format misattributing preprocessor directives to macros

Jacob Abraham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 7 13:40:32 PDT 2022


jacob-abraham updated this revision to Diff 466165.
jacob-abraham added a comment.

Added regression test


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135422/new/

https://reviews.llvm.org/D135422

Files:
  clang/test/Format/macro.cpp


Index: clang/test/Format/macro.cpp
===================================================================
--- /dev/null
+++ clang/test/Format/macro.cpp
@@ -0,0 +1,5 @@
+// RUN: clang-format -style="{AllowShortCaseLabelsOnASingleLine: true}" %s > %t
+// RUN: diff %s %t
+#define X                                                                      \
+  case 0: break;
+#include "f"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135422.466165.patch
Type: text/x-patch
Size: 380 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221007/ee157e33/attachment.bin>


More information about the cfe-commits mailing list