[PATCH] D145262: [clang-format] Treat AttributeMacros more like attribute macros

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 6 12:25:10 PST 2023


HazardyKnusperkeks added inline comments.


================
Comment at: clang/unittests/Format/FormatTestObjC.cpp:1528
+  // This is added to acknowledge the behavior, but it should be improved.
+  verifyFormat("ATTRIBUTE_MACRO ATTRIBUTE_MACRO(X)\n"
+               "@interface Foo\n"
----------------
So there is most likely a `CanBreak` not `true`? That happens also in the `TokenAnnotator`.


================
Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:1321
+  EXPECT_TOKEN(Tokens[3], tok::r_paren, TT_AttributeParen);
+}
+
----------------
Your bug is in regard to Objective-C, right? Maybe add a test for that here too?


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

https://reviews.llvm.org/D145262



More information about the cfe-commits mailing list