clang-format: [JS] ASI insertion after boolean literals.
authorMartin Probst <martin@probst.io>
Sun, 18 Sep 2016 17:21:52 +0000 (17:21 +0000)
committerMartin Probst <martin@probst.io>
Sun, 18 Sep 2016 17:21:52 +0000 (17:21 +0000)
commitd2ea2d9e134f8e5ada6303e3e59fc22f85089493
treedb53ec1edfa3d2d8584bf698c579ad8010316fbd
parentf293c786ad7947942509fc0013f0774540ca375b
clang-format: [JS] ASI insertion after boolean literals.

Summary:
Before when a semicolon was missing after a boolean literal:
    a = true
    return 1;

clang-format would parse this as one line and format as:
    a = true return 1;

It turns out that C++ does not consider `true` and `false` to be literals, we
have to check for that explicitly.

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

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