mprobst accepted this revision. mprobst added inline comments. This revision is now accepted and ready to land.
================ Comment at: lib/Format/BreakableToken.cpp:436 + if (Style.Language == FormatStyle::LK_JavaScript) { + if ((Lines[0] == "*" || Lines[0].startswith("* ")) && Lines.size() > 1) { + // This is a multiline jsdoc comment. ---------------- krasimir wrote: > mprobst wrote: > > mprobst wrote: > > > Wouldn't we also want to do this for `/**blah`, i.e. no whitespace after > > > `*`? > > Would we also want to do this for simple block comments, e.g. `/*blah*/`? > > That's a bit more tricky as they can be used inline, not sure about the > > corner cases there. > I explicitly check for a whitespace after the `*` to take care of strange > stuff that is not javadoc, like ASCII art or lines like: > ``` > /******** > * #yolo > */ > ``` > I think we can decide for simple block comments later and leave them as-is > for now. Makes sense. Maybe add some negative tests for such situations, to make sure we don't screw up the source? https://reviews.llvm.org/D35683 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits