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())
44 }
else if (
const auto *UnOp = dyn_cast<UnaryOperator>(S)) {
45 if (UnOp->getOpcode() == UO_AddrOf)
47 }
else if (
const auto *LE = dyn_cast<LambdaExpr>(S)) {
50 }
else if (
const auto *ILE = dyn_cast<InitListExpr>(S)) {
51 return llvm::any_of(ILE->inits(), [Var](
const Expr *ChildE) {
55 return isAccessForVar(ChildE, Var);