]> granicus.if.org Git - clang/commit
clang-format: [JS] for await, and fix a crash with for loops.
authorMartin Probst <martin@probst.io>
Thu, 18 May 2017 21:19:29 +0000 (21:19 +0000)
committerMartin Probst <martin@probst.io>
Thu, 18 May 2017 21:19:29 +0000 (21:19 +0000)
commit86fb5b7268f41cf895f7f36099c99d799d3dc004
treecdcb5e0b7e9c8f2d51e0de94cfe56d72c40caee8
parent8f8b650525b0c48938b44c29dfd3df1699851d82
clang-format: [JS] for await, and fix a crash with for loops.

Summary:
The syntax is actually `for await (const x of y)` (d'oh).
This also fixes a crash for `for` tokens not followed by additional tokens.

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

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