summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-05-31 08:40:37 +0000
committerDaniel Jasper <djasper@google.com>2015-05-31 08:40:37 +0000
commitcd8d4ff98598b3234181e826a7a900eecf9bd455 (patch)
tree8cecaf18dd6691cbd915d54f5049ff4691deb75b /clang/lib/Format
parentaa47cf9dae55180bdbddbc93ee037bba529f5a24 (diff)
downloadbcm5719-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.cpp2
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;
OpenPOWER on IntegriCloud