[PATCH] D116385: [clangd] Code action for creating an ObjC initializer

David Goldman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 29 13:26:34 PST 2021


dgoldman created this revision.
Herald added subscribers: usaxena95, kadircet, arphaman, mgorny.
dgoldman requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116385

Files:
  clang-tools-extra/clangd/refactor/tweaks/CMakeLists.txt
  clang-tools-extra/clangd/refactor/tweaks/ObjCMemberwiseInitializer.cpp
  clang-tools-extra/clangd/unittests/CMakeLists.txt
  clang-tools-extra/clangd/unittests/tweaks/ObjCMemberwiseInitializerTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116385.396568.patch
Type: text/x-patch
Size: 16286 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211229/f06ffe0e/attachment-0001.bin>


More information about the cfe-commits mailing list