[PATCH] D24477: clang-format: [JS] Do not wrap taze: IWYU comments
Martin Probst via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 12 15:31:43 PDT 2016
mprobst created this revision.
mprobst added a reviewer: djasper.
mprobst added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
See (sorry, internal link): go/taze#global-symbols-dts-externs.
Before:
// taze: many, different, symbols from
// //some/long/iwyu/style/target
After:
// taze: many, different, symbols from //some/long/iwyu/style/target
https://reviews.llvm.org/D24477
Files:
lib/Format/Format.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
===================================================================
--- unittests/Format/FormatTestJS.cpp
+++ unittests/Format/FormatTestJS.cpp
@@ -1429,5 +1429,10 @@
"}");
}
+TEST_F(FormatTestJS, ImportComments) {
+ verifyFormat("import {x} from 'x'; // from //x:x", getGoogleJSStyleWithColumns(25));
+ verifyFormat("xx; // taze: x from //x:x", getGoogleJSStyleWithColumns(10));
+}
+
} // end namespace tooling
} // end namespace clang
Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -613,7 +613,7 @@
GoogleStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Empty;
GoogleStyle.AlwaysBreakBeforeMultilineStrings = false;
GoogleStyle.BreakBeforeTernaryOperators = false;
- GoogleStyle.CommentPragmas = "@(export|requirecss|return|see|visibility) ";
+ GoogleStyle.CommentPragmas = "(taze:|@(export|requirecss|return|see|visibility)) ";
GoogleStyle.MaxEmptyLinesToKeep = 3;
GoogleStyle.NamespaceIndentation = FormatStyle::NI_All;
GoogleStyle.SpacesInContainerLiterals = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24477.71062.patch
Type: text/x-patch
Size: 1187 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160912/31634d75/attachment.bin>
More information about the cfe-commits
mailing list