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

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 5 02:34:27 PDT 2021


krasimir accepted this revision.
krasimir added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:1563
+      if (Current.Previous) {
+        bool isIdentifier =
+            Style.Language == FormatStyle::LK_JavaScript
----------------
nit: `s/isIdentifier/IsIdentifier/` (LLVM style uses CamelCase for local variables)


================
Comment at: clang/unittests/Format/FormatTestCSharp.cpp:365
+
+  verifyFormat("test \?\?= ABC;", Style);
+  verifyFormat("test \?\?= true;", Style);
----------------
nit: you could use raw string literals for the `??=` test cases (e.g., `R"(test ??= ABC;)"`).


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