================ @@ -423,8 +427,6 @@ bool childExprIsStmt(const Stmt *Outer, const Expr *Inner) { if (!Outer || !Inner) return false; // Exclude the most common places where an expr can appear but be unused. - if (llvm::isa<CompoundStmt>(Outer)) ---------------- HighCommander4 wrote:
We should revise the name of this function from `childExprIsStmt`, which is no longer accurate, to something like `childExprIsDisallowedStmt`, and update the [comment at the call site](https://searchfox.org/llvm/rev/7831c5e4831963425279db7b1c4d23cfa9da9674/clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp#479-480) to talk about what kind of statements we allow extracting and what kind we don't. https://github.com/llvm/llvm-project/pull/112525 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits