[PATCH] D49797: [clang-format] Indent after breaking Javadoc annotated line

Martin Probst via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 26 05:22:51 PDT 2018


mprobst added inline comments.


================
Comment at: lib/Format/BreakableToken.cpp:526
+      0, Content[LineIndex].find_first_of(Blanks));
+  if (FirstWord == "@param")
+    return Style.ContinuationIndentWidth;
----------------
Shouldn't this check the set above?


================
Comment at: unittests/Format/FormatTestComments.cpp:3109
+TEST_F(FormatTestComments, IndentsLongJavadocAnnotatedLines) {
+  FormatStyle Style = getGoogleStyle(FormatStyle::LK_Java);
+  Style.ColumnLimit = 60;
----------------
add a test using `@return` or `@type`?


================
Comment at: unittests/Format/FormatTestComments.cpp:3154
+
+  EXPECT_EQ("/**\n"
+            " * @param l1 long1\n"
----------------
do we already have a test that `@param {oh noes this is really long} foo` isn't broken?


Repository:
  rC Clang

https://reviews.llvm.org/D49797





More information about the cfe-commits mailing list