34 if (
const auto *VD = dyn_cast<VarDecl>(Var); VD && VD->isEscapingByref())
37 if (
const auto *DS = dyn_cast<DeclStmt>(S)) {
38 for (
const Decl *D : DS->getDeclGroup()) {
39 if (
const auto *LeftVar = dyn_cast<VarDecl>(D)) {
40 if (LeftVar->hasInit() && LeftVar->getType()->isReferenceType()) {
45 }
else if (
const auto *UnOp = dyn_cast<UnaryOperator>(S)) {
46 if (UnOp->getOpcode() == UO_AddrOf)
48 }
else if (
const auto *LE = dyn_cast<LambdaExpr>(S)) {
51 }
else if (
const auto *ILE = dyn_cast<InitListExpr>(S)) {
52 return llvm::any_of(ILE->inits(), [Var](
const Expr *ChildE) {
56 return isAccessForVar(ChildE, Var);