diff options
author | Daniel Jasper <djasper@google.com> | 2015-05-31 08:40:37 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-05-31 08:40:37 +0000 |
commit | cd8d4ff98598b3234181e826a7a900eecf9bd455 (patch) | |
tree | 8cecaf18dd6691cbd915d54f5049ff4691deb75b /clang/lib/Format | |
parent | aa47cf9dae55180bdbddbc93ee037bba529f5a24 (diff) | |
download | bcm5719-llvm-cd8d4ff98598b3234181e826a7a900eecf9bd455.tar.gz bcm5719-llvm-cd8d4ff98598b3234181e826a7a900eecf9bd455.zip |
clang-format: [JS] Fix line breaks in computed property names.
Before:
let foo = {
[someLongKeyHere]: 1,
someOtherLongKeyHere: 2, [keyLongEnoughToWrap]: 3,
lastLongKey: 4
};
After:
let foo = {
[someLongKeyHere]: 1,
someOtherLongKeyHere: 2,
[keyLongEnoughToWrap]: 3,
lastLongKey: 4
};
llvm-svn: 238671
Diffstat (limited to 'clang/lib/Format')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 3b6628ecfbd..ad40d99ad82 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1321,7 +1321,7 @@ private: else if (Current->is(TT_LambdaArrow)) return prec::Comma; else if (Current->isOneOf(tok::semi, TT_InlineASMColon, - TT_SelectorName) || + TT_SelectorName, TT_JsComputedPropertyName) || (Current->is(tok::comment) && NextNonComment && NextNonComment->is(TT_SelectorName))) return 0; |