[all-commits] [llvm/llvm-project] 799b79: [clang-format] C# short ternary operator misinterp...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Tue Apr 18 02:18:55 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 799b794d7699bc7ecf07d8d588e125edb3967507
      https://github.com/llvm/llvm-project/commit/799b794d7699bc7ecf07d8d588e125edb3967507
  Author: mydeveloperday <mydeveloperday at gmail.com>
  Date:   2023-04-18 (Tue, 18 Apr 2023)

  Changed paths:
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/TokenAnnotatorTest.cpp

  Log Message:
  -----------
  [clang-format] C# short ternary operator misinterpreted as a CSharpNullable

Refactor the CSharpNullable assignment code to be a little easier to read (Honestly I don't like it when an if expression get really long and complicated).
Handle the case where '?' is actually a ternary operator.

Fixes: #58067

Reviewed By: owenpan, HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D148473




More information about the All-commits mailing list