HomePhabricator

[clang-rename] Handle designated initializers.

Authored by dcastagna on Apr 12 2021, 1:15 PM.

Description

[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

Details

Committed
jlebarApr 12 2021, 1:15 PM
Differential Revision
D100310: Add field designated initializers logic in Tooling/Rename
Parents
rGba62ebc48e8c: [lldb] Disable Shell/Subporcess with reproducers
Branches
Unknown
Tags
Unknown