Summary:
`// taze: ... from ...` comments are used help tools where a
specific global symbol comes from.
Before:
// taze: many, different, symbols from
// 'some_long_location_here'
After:
// taze: many, different, symbols from 'some_long_location_here'
Reviewers: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D24477
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281857
91177308-0d34-0410-b5e6-
96231b3b80d8
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;
"}");
}
+TEST_F(FormatTestJS, ImportComments) {
+ verifyFormat("import {x} from 'x'; // from some location",
+ getGoogleJSStyleWithColumns(25));
+ verifyFormat("// taze: x from 'location'", getGoogleJSStyleWithColumns(10));
+}
+
} // end namespace tooling
} // end namespace clang