]> granicus.if.org Git - clang/commit
clang-format: [JS] Prevent ASI before [ and (.
authorMartin Probst <martin@probst.io>
Fri, 26 Jan 2018 15:07:49 +0000 (15:07 +0000)
committerMartin Probst <martin@probst.io>
Fri, 26 Jan 2018 15:07:49 +0000 (15:07 +0000)
commit08ca9616916dfa4802feb1a1c4b56ae9221208f7
treea183e423fa941d72107d64f694c1c7aa7acf4e76
parent0763d20f307e6aa5c30656a0c8755d9503dd905d
clang-format: [JS] Prevent ASI before [ and (.

Summary:
JavaScript automatic semicolon insertion can trigger before [ and (, so
avoid breaking before them if the previous token is likely to terminate
an expression.

Reviewers: djasper

Subscribers: cfe-commits, klimek

Differential Revision: https://reviews.llvm.org/D42570

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323532 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestJS.cpp