llvm-project/clang/lib/Tooling/Refactoring/Rename
Daniele Castagna 7dd6068899
[clang-rename] Handle designated initializers.
clang Tooling, and more specifically Refactoring/Rename, have support
code to extract source locations given a Unified Symbol Resolution set.
This support code is used by clang-rename and other tools that might not
be in the tree.

Currently field designated initializer are not supported.
So, renaming S::a to S::b in this code:

  S s = { .a = 10 };

will not extract the field designated initializer for a (the 'a' after the
dot).

This patch adds support for field designated initialized to
RecursiveSymbolVisitor and RenameLocFinder that is used in
createRenameAtomicChanges.

Differential Revision: https://reviews.llvm.org/D100310
2021-04-12 13:15:14 -07:00
..
RenamingAction.cpp
SymbolOccurrences.cpp [clang][Tooling] Get rid of a hack in SymbolOccurrences, NFCI 2021-01-22 13:01:41 +00:00
USRFinder.cpp [clang][NFC] Use SmallString instead of SmallVector<char 2020-11-17 13:02:58 +00:00
USRFindingAction.cpp [clang-rename] Fix rename on variable templates. 2020-10-19 09:44:59 +02:00
USRLocFinder.cpp [clang-rename] Handle designated initializers. 2021-04-12 13:15:14 -07:00