djasper added inline comments. ================ Comment at: lib/Format/TokenAnnotator.cpp:1001 @@ -1000,3 +1000,3 @@ if (Style.Language == FormatStyle::LK_JavaScript && - Line.MustBeDeclaration) { + !Contexts.back().IsExpression) { // In JavaScript, `interface X { foo?(): bar; }` is an optional method ---------------- Well, if you keep the Line.MustBeDeclaration here, then the test case does not regress. I believe that the test in itself probably doesn't make much sense, but at least then we aren't regressing it. At any rate, it seems bad to keep the Line.MustBeDeclaration above and remove it here.
http://reviews.llvm.org/D21658 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits