[PATCH] D75368: [clang-format] Handle NullCoalescing and NullConditional operators in C#

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 05:29:48 PST 2020


krasimir accepted this revision.
krasimir added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Format/FormatToken.h:109
+  TYPE(CSharpNullConditional)                                                  \
+  TYPE(CSharpNullConditionalSq)                                                \
   TYPE(Unknown)
----------------
nit: consider renaming to `CSharpNullConditionalLSquare` for consistency with other similar token types.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:2955
+    if (Left.is(TT_CSharpNullConditionalSq))
+      return Style.SpacesInSquareBrackets;
+
----------------
please add a test case about this where `Style.SpacesInSquareBrakets == true`.


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

https://reviews.llvm.org/D75368





More information about the cfe-commits mailing list