[clang-tools-extra] Support renaming designated initializers (PR #86976)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 2 06:09:07 PDT 2024


================
@@ -367,6 +367,24 @@ class RenamerClangTidyVisitor
     return true;
   }
 
+  bool VisitDesignatedInitExpr(DesignatedInitExpr *Expr) {
+    for (const auto &Designator : Expr->designators()) {
+      if (!Designator.isFieldDesignator())
+        continue;
+      FieldDecl *FD = Designator.getFieldDecl();
+      if (!FD)
+        continue;
+      IdentifierInfo *II = FD->getIdentifier();
----------------
EugeneZelenko wrote:

Ditto.

https://github.com/llvm/llvm-project/pull/86976


More information about the cfe-commits mailing list