]> granicus.if.org Git - clang/commit
clang-format: [JS] fix `of` detection.
authorMartin Probst <martin@probst.io>
Mon, 19 Feb 2018 12:32:13 +0000 (12:32 +0000)
committerMartin Probst <martin@probst.io>
Mon, 19 Feb 2018 12:32:13 +0000 (12:32 +0000)
commitc60f53e8fa7208af22726e30d1271fe611ddf602
tree218ddba6d111ec86e33468f1630cb835dfc378d8
parent32300d853f6a3f2f9a33102b895070e3c893d2a1
clang-format: [JS] fix `of` detection.

Summary:
`of` is only a keyword when after an identifier, but not when after
an actual keyword.

Before:
    return of (a, b, c);
After:
    return of(a, b, c);

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

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