SureYeaah marked 14 inline comments as done.
SureYeaah added inline comments.


================
Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:173
+      // give up if extraction will take a variable out of scope
+      if (!extractionAllowed(ParStmt, N, M))
+        break;
----------------
sammccall wrote:
> here you're traversing the whole Expr to find the referenced decls at each 
> iteration of this loop.
> Can you analyse the expr just once, and reuse the list of decls?
I thought it'll only be analyzed once but actually it's at max twice in the 
case where the selected expression is a part of a DeclStmt in the <Init> of a 
ForStmt.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63773



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

Reply via email to