dgoldman added inline comments.

================
Comment at: clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp:418
+  if (const auto *ME = dyn_cast<MemberExpr>(E))
+    if (const auto *TE = dyn_cast<CXXThisExpr>(ME->getBase()))
+      if (TE->isImplicit())
----------------
sammccall wrote:
> oops, I forgot one detail: we want ME->getBase()->IgnoreImpCasts()
> 
> (in `void nonConstMethod() { constMethod(); }` there's an ImplicitCastExpr in 
> there...
Hmm, is this right, I tested out that example and it seems like that's actually 
a `CXXMemberCallExpr` which this doesn't handle?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124486

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

Reply via email to