krasimir added inline comments.
================ Comment at: clang/lib/Format/TokenAnnotator.cpp:2869 + // space before '{' in "new MyType {" + if (Left.is(TT_Unknown) && Right.is(tok::l_brace) && Left.Previous && + Left.Previous->is(tok::kw_new)) ---------------- krasimir wrote: > This test feels a bit too rigid: you might additionally want to consider `new > Type<Param> {` and `new Type /*comment*/ {` and `new [] /* comment */ {`. > For these you might find the `MatchingParen` and `getPreviousNonComment` > useful. And example for this is below, at line 2880-2885 in javascript > handling. Sorry, disregard the patterns with `/* comment */` above. I guess the spaces around the comment there are enforced at another place. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72401/new/ https://reviews.llvm.org/D72401 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits