[all-commits] [llvm/llvm-project] 7dd606: [clang-rename] Handle designated initializers.
Justin Lebar via All-commits
all-commits at lists.llvm.org
Mon Apr 12 13:19:07 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7dd60688992526bb7ee0c7846e9abd591fc3e297
https://github.com/llvm/llvm-project/commit/7dd60688992526bb7ee0c7846e9abd591fc3e297
Author: Daniele Castagna <dcastagna at google.com>
Date: 2021-04-12 (Mon, 12 Apr 2021)
Changed paths:
M clang/include/clang/Tooling/Refactoring/RecursiveSymbolVisitor.h
M clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp
M clang/unittests/Rename/RenameClassTest.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list