MyDeveloperDay marked an inline comment as done.
MyDeveloperDay added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2314
+      nextToken();
+      if (FormatTok->Tok.is(tok::less)) {
+        while (!FormatTok->Tok.is(tok::greater)) {
----------------
klimek wrote:
> MyDeveloperDay wrote:
> > miscco wrote:
> > > miscco wrote:
> > > > I guess you could use `parseBracedList(/*ContinueOnSemicolons=*/false, 
> > > > /*IsEnum=*/false,/*ClosingBraceKind=*/tok::greater);` here?
> > > To be more specific, I am concerned what happens if you have multiple 
> > > template arguments where a linebreak should occur. Is this still 
> > > happening here?
> > > 
> > > 
> > > ```
> > > template <typename someLongTypename1, typename someLongTypename2>
> > > concept someVeryLongConceptName = 
> > > someVeryLongConstraintName1<someLongTypename1 && someLongTypename2>;
> > > ```
> > This is formatted as
> > 
> > ```
> > template <typename someLongTypename1, typename someLongTypename2>
> > concept someVeryLongConceptName =
> >     someVeryLongConstraintName1<someLongTypename1 && someLongTypename2>;
> > ```
> This seems like a very detailed way to parse them; generally, we try to only 
> parse rough structure here.
So whilst I tend to agree, and I've tried to write this loop to be less and it 
just didn't seem to catch the cases that had already been given in the unit 
tests,

This ended up being a lot likes its own parseStructuralElement, I think the 
difference here is that I've written it as a series of if's rather than a 
switch statement.

I feel I'd be happier to push the patch through then address individual 
specific cases



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79773/new/

https://reviews.llvm.org/D79773

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D7977... Marek Kurdej via Phabricator via cfe-commits
    • [PATCH] ... MyDeveloperDay via Phabricator via cfe-commits
    • [PATCH] ... Marek Kurdej via Phabricator via cfe-commits
    • [PATCH] ... MyDeveloperDay via Phabricator via cfe-commits
    • [PATCH] ... MyDeveloperDay via Phabricator via cfe-commits
    • [PATCH] ... MyDeveloperDay via Phabricator via cfe-commits
    • [PATCH] ... MyDeveloperDay via Phabricator via cfe-commits
    • [PATCH] ... Michael Schellenberger Costa via Phabricator via cfe-commits
    • [PATCH] ... MyDeveloperDay via Phabricator via cfe-commits
    • [PATCH] ... Mitchell via Phabricator via cfe-commits
    • [PATCH] ... Marek Kurdej via Phabricator via cfe-commits
    • [PATCH] ... MyDeveloperDay via Phabricator via cfe-commits
    • [PATCH] ... MyDeveloperDay via Phabricator via cfe-commits
    • [PATCH] ... Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
    • [PATCH] ... MyDeveloperDay via Phabricator via cfe-commits

Reply via email to