[all-commits] [llvm/llvm-project] 1af5fb: [clangd] Code action for creating an ObjC initializer

David Goldman via All-commits all-commits at lists.llvm.org
Thu Mar 17 08:32:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1af5fbd5c605372963f78351f721fa28ee5ba60e
      https://github.com/llvm/llvm-project/commit/1af5fbd5c605372963f78351f721fa28ee5ba60e
  Author: David Goldman <davg at google.com>
  Date:   2022-03-17 (Thu, 17 Mar 2022)

  Changed paths:
    M clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt
    A clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp
    M clang-tools-extra/clangd/unittests/CMakeLists.txt
    A clang-tools-extra/clangd/unittests/tweaks/ObjCMemberwiseInitializerTests.cpp

  Log Message:
  -----------
  [clangd] Code action for creating an ObjC initializer

The code action creates an initializer for the selected
ivars/properties, defaulting to all if only the interface/implementation
container is selected.

We add it based on the position of the first non initializer that we
see, and default to adding it where the @end token is.

We also use the ObjC parameter form of (nullable id) instead of
(id _Nullable) if the property has the nullable attribute.

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




More information about the All-commits mailing list