diff options
author | Martin Probst <martin@probst.io> | 2017-02-28 11:08:24 +0000 |
---|---|---|
committer | Martin Probst <martin@probst.io> | 2017-02-28 11:08:24 +0000 |
commit | bb46a7dd2aa6a725dd2825c2f66a2f61719ba84f (patch) | |
tree | 78de8c7ffa0fdded0b103104128777b86dcbe541 /clang/lib/Format/Format.cpp | |
parent | 6159f1290ef9e337e4409967ff971f11d3d53e41 (diff) | |
download | bcm5719-llvm-bb46a7dd2aa6a725dd2825c2f66a2f61719ba84f.tar.gz bcm5719-llvm-bb46a7dd2aa6a725dd2825c2f66a2f61719ba84f.zip |
Blacklist arbitrary @\\w+ JSDoc tags from wrapping.
Summary:
Also limits the blacklisting to only apply when the tag is actually
followed by a parameter in curly braces.
/** @mods {long.type.must.not.wrap} */
vs
/** @const this is a long description that may wrap. */
Reviewers: djasper
Subscribers: klimek, krasimir, cfe-commits
Differential Revision: https://reviews.llvm.org/D30452
llvm-svn: 296467
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 99787408133..28e99778714 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -620,8 +620,8 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { GoogleStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Empty; GoogleStyle.AlwaysBreakBeforeMultilineStrings = false; GoogleStyle.BreakBeforeTernaryOperators = false; - GoogleStyle.CommentPragmas = - "(taze:|@(export|requirecss|return|returns|see|visibility)) "; + // taze:, and @tag followed by { for a lot of JSDoc tags. + GoogleStyle.CommentPragmas = "(taze:|(@[A-Za-z_0-9-]+[ \\t]*{))"; GoogleStyle.MaxEmptyLinesToKeep = 3; GoogleStyle.NamespaceIndentation = FormatStyle::NI_All; GoogleStyle.SpacesInContainerLiterals = false; |