[PATCH] D82306: [Sema][CodeComplete][ObjC] Don't split the first selector fragment

David Goldman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 22 08:35:19 PDT 2020


dgoldman created this revision.
dgoldman added reviewers: sammccall, doug.gregor.
Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, dexonsmith, ilya-biryukov.
Herald added a project: clang.

Standardize the formatting of selector fragments to include the ':',
e.g. for `- (void)foobar:(int)foobar;`, report `{foobar:}` instead of
`{foobar}{:}`. This was normally the case except for a couple of places
where it was split.

This also improves integration with clangd since it relies upon the `:`
to identify ObjC selectors.

NOTE: It is possible to have selector fragments that are just `:` with
no text, we now handle this properly for the first fragment.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82306

Files:
  clang/lib/Sema/SemaCodeComplete.cpp
  clang/test/Index/complete-method-decls.m
  clang/test/Index/complete-parameterized-classes.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82306.272442.patch
Type: text/x-patch
Size: 22159 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200622/b0e1486c/attachment-0001.bin>


More information about the cfe-commits mailing list