owenpan added inline comments.

================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1955-1957
+    if (Style.isCSharp() && FormatTok->is(TT_FatArrow) &&
+        tryToParseChildBlock())
+      continue;
----------------
peterstys wrote:
> owenpan wrote:
> > peterstys wrote:
> > > It seems that this block could be removed altogether, because this is 
> > > already done on lines 1964-165, and it's done regardless if it the 
> > > language is C# or not.
> > Lines 1964-1965 only apply to JavaScript because of line 1958, so lines 
> > 1955-1957 cannot be removed.
> Oh yes, sorry I missed the Javascript block. I wonder if in that case 
> wouldn't be more consistent to add Javascript check on the line 1955 to be 
> consistent with how the same block of logic is handled on the lines 1641-1645.
I don't think so because here we must parse the optional `async function` part 
first for JavaScript only.


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

https://reviews.llvm.org/D115967

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to