[PATCH] D89307: [clangd] Disable extract variable for RHS of assignments

Adam Czachorowski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 04:48:48 PDT 2020


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


================
Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:400
+  // This would just result in duplicating the code.
+  if (const auto *BO = Parent->ASTNode.get<BinaryOperator>()) {
+    if (BO->isAssignmentOp() &&
----------------
nit: you can fold the two if-s together.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89307



More information about the cfe-commits mailing list