[clang-format] do not break before @tags in JS comments
authorKrasimir Georgiev <krasimir@google.com>
Wed, 11 Nov 2020 11:07:30 +0000 (12:07 +0100)
committerKrasimir Georgiev <krasimir@google.com>
Wed, 11 Nov 2020 11:27:15 +0000 (12:27 +0100)
commit77b484116971337c9584fe101cdf1bca7f07f4dd
treecf04518082b0b9c3b6a4d0518fe3ffe39edf6fb0
parent250de7388b34500b1597d25af5c42f718ed28575
[clang-format] do not break before @tags in JS comments

In JavaScript breaking before a `@tag` in a comment puts it on a new line, and
machinery that parses these comments will fail to understand such comments.

This adapts clang-format to not break before `@`. Similar functionality exists
for not breaking before `{`.

Reviewed By: mprobst

Differential Revision: https://reviews.llvm.org/D91078
clang/lib/Format/BreakableToken.cpp
clang/unittests/Format/FormatTestJS.cpp