[PATCH] D72746: [clangd] Add a flag for implicit references in the Index

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 14 18:29:08 PST 2020


kbobyrev created this revision.
kbobyrev added a reviewer: kadircet.
Herald added subscribers: usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.
kbobyrev added a subscriber: hokein.

This patch allows the index does to provide a way to distinguish implicit
references (e.g. coming from macro expansions). The corresponding flag was
added to RefKind and symbols that are referenced without spelling their name
explicitly are now marked implicit. This fixes incorrect behavior when renaming
a symbol that was referenced in macro expansions would try to rename macro
invocations.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72746

Files:
  clang-tools-extra/clangd/index/Ref.h
  clang-tools-extra/clangd/index/SymbolCollector.cpp
  clang-tools-extra/clangd/refactor/Rename.cpp
  clang-tools-extra/clangd/unittests/RenameTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72746.238159.patch
Type: text/x-patch
Size: 4124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200115/5b417a65/attachment.bin>


More information about the cfe-commits mailing list