[PATCH] D101702: [clang-format] Add more support for C# 8 nullables

Eliza via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 3 13:34:41 PDT 2021


exv added inline comments.


================
Comment at: clang/unittests/Format/FormatTestCSharp.cpp:365
+
+  verifyFormat("test \?\?= ABC;", Style);
+  verifyFormat("test \?\?= true;", Style);
----------------
HazardyKnusperkeks wrote:
> Why do you escape `?`? I've never seen that.
Apparently, ??= is a trigraph for "#" in C, so it must be escaped:

https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C

To be honest, I'd never heard of this bizarre language "feature" until I wrote this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101702



More information about the cfe-commits mailing list