[PATCH] D24767: clang-format: [JS] do not wrapp @returns tags.

Martin Probst via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 20 08:16:03 PDT 2016


mprobst created this revision.
mprobst added a reviewer: djasper.
mprobst added a subscriber: cfe-commits.
Herald added a subscriber: klimek.

@returns is incorrect code, the standard is @return. However wrapping it can still confuse users.

https://reviews.llvm.org/D24767

Files:
  lib/Format/Format.cpp

Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -613,7 +613,8 @@
     GoogleStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Empty;
     GoogleStyle.AlwaysBreakBeforeMultilineStrings = false;
     GoogleStyle.BreakBeforeTernaryOperators = false;
-    GoogleStyle.CommentPragmas = "(taze:|@(export|requirecss|return|see|visibility)) ";
+    GoogleStyle.CommentPragmas =
+        "(taze:|@(export|requirecss|return|returns|see|visibility)) ";
     GoogleStyle.MaxEmptyLinesToKeep = 3;
     GoogleStyle.NamespaceIndentation = FormatStyle::NI_All;
     GoogleStyle.SpacesInContainerLiterals = false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24767.71938.patch
Type: text/x-patch
Size: 709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160920/ebd9e1f9/attachment.bin>


More information about the cfe-commits mailing list