hokein accepted this revision.
hokein added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:132
+    // instantiated.
+    // FIXME: Maybe a proper way of fixing this would be enhancing Clang AST
+    // although it might be a bigger effort.
----------------
not sure the `FIXME` is useful here, we may never do that, I'd just drop it.


================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:138
+    FieldParent = FieldParent->getTemplateInstantiationPattern();
+    if (!FieldParent)
+      return Field->getCanonicalDecl();
----------------
nit: this if branch is not necessary, because the if below already handles that.


================
Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:150
+    const VarDecl *OriginalVD = VD->getInstantiatedFromStaticDataMember();
+    if (OriginalVD)
+      VD = OriginalVD;
----------------
nit: we can inline the OriginalVD declaration into the `if`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91952/new/

https://reviews.llvm.org/D91952

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to