================ @@ -27,6 +28,13 @@ tryToFindPtrOrigin(const Expr *E, bool StopAtFirstRefCountedObj) { E = tempExpr->getSubExpr(); continue; } + if (auto *DRE = dyn_cast<DeclRefExpr>(E)) { + auto *decl = DRE->getFoundDecl(); ---------------- haoNoQ wrote:
Is this really better than `getDecl()`? For variables I don't think there could be many of those, and even if there are, it's probably easier to deal with the default one. https://github.com/llvm/llvm-project/pull/82305 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits