[PATCH] D75368: [clang-format] Handle ?. ?? and ?[ as C# tokens

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 03:54:08 PST 2020


krasimir added inline comments.


================
Comment at: clang/include/clang/Basic/TokenKinds.def:237
+// C# support
+PUNCTUATOR(questionquestion,          "??")
+PUNCTUATOR(questionlsquare,           "?[")
----------------
I think this is not a good place to add these.
I think these definitions are generally for languages clang itself supports (compiling)
This could have unexpected ripple effects in unrelated parts of the clang.
Could you try to handle these somehow in lib/Format/FormatTokenLexer?
That's where the clang-format has some glue / heuristics for handling other languages syntax.



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

https://reviews.llvm.org/D75368





More information about the cfe-commits mailing list