diff options
author | Daniel Jasper <djasper@google.com> | 2015-06-02 15:04:29 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-06-02 15:04:29 +0000 |
commit | 40432cee93578aeee09328ed704dcba445cc4f1b (patch) | |
tree | ba4a5bc70260f2ee2692dd8016ab2cfaa36d33d6 /clang/lib/Format | |
parent | 531063b274924d6db9d4058eb1163c051e3525a4 (diff) | |
download | bcm5719-llvm-40432cee93578aeee09328ed704dcba445cc4f1b.tar.gz bcm5719-llvm-40432cee93578aeee09328ed704dcba445cc4f1b.zip |
clang-format: [JS] Array literal detection fix #3.
llvm-svn: 238839
Diffstat (limited to 'clang/lib/Format')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 0cfcd8921dd..19b47baeb40 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -280,8 +280,8 @@ private: Parent->isOneOf(tok::l_brace, tok::comma)) { Left->Type = TT_JsComputedPropertyName; } else if (Parent && - Parent->isOneOf(tok::at, tok::equal, tok::comma, - tok::l_paren, tok::question, tok::colon)) { + Parent->isOneOf(tok::at, tok::equal, tok::comma, tok::l_paren, + tok::l_square, tok::question, tok::colon)) { Left->Type = TT_ArrayInitializerLSquare; } else { BindingIncrease = 10; |