diff options
| author | Martin Probst <martin@probst.io> | 2018-02-19 12:32:13 +0000 |
|---|---|---|
| committer | Martin Probst <martin@probst.io> | 2018-02-19 12:32:13 +0000 |
| commit | 110ecc70020f15ab0e519fd991a945ad918150da (patch) | |
| tree | 39902ebcc3604e6ddc229e04fda0300a24ccf140 /clang/unittests/Format/FormatTestJS.cpp | |
| parent | f03f579d1dc9bd09c1d72fa870b677587997ecc5 (diff) | |
| download | bcm5719-llvm-110ecc70020f15ab0e519fd991a945ad918150da.tar.gz bcm5719-llvm-110ecc70020f15ab0e519fd991a945ad918150da.zip | |
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
llvm-svn: 325489
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index 47886521008..b9983f5c6e0 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -294,6 +294,7 @@ TEST_F(FormatTestJS, ReservedWords) { verifyFormat("x.for = 1;"); verifyFormat("x.of();"); verifyFormat("of(null);"); + verifyFormat("return of(null);"); verifyFormat("import {of} from 'x';"); verifyFormat("x.in();"); verifyFormat("x.let();"); |

