Page MenuHomePhabricator

[clang-format] Improved identification of C# nullables

Authored by jbcoe on Mar 11 2020, 5:01 AM.



Allow ? inside C# generics.

Do not mistake casts like (Type?) as conditional operators.

Diff Detail

Event Timeline

jbcoe created this revision.Mar 11 2020, 5:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2020, 5:01 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
krasimir added inline comments.Mar 11 2020, 5:44 AM

nit: add a space before and in the comment:

// ... `Type? name;`and ...

nit: just replace the outer if body by:
return !Right.isOneOf(TT_TemplateCloser, tok::r_paren);

jbcoe edited the summary of this revision. (Show Details)Mar 11 2020, 5:51 AM
jbcoe updated this revision to Diff 249596.Mar 11 2020, 6:00 AM

Fix nits from review.

krasimir accepted this revision.Mar 11 2020, 6:03 AM

Thank you!

This revision is now accepted and ready to land.Mar 11 2020, 6:03 AM
This revision was automatically updated to reflect the committed changes.