Lines Matching refs:VD
268 const ValueDecl *VD = cast<ValueDecl>(DRE->getDecl()->getCanonicalDecl()); in translateDeclRefExpr() local
271 if (const ParmVarDecl *PV = dyn_cast_or_null<ParmVarDecl>(VD)) { in translateDeclRefExpr()
283 VD = FD->getParamDecl(I); in translateDeclRefExpr()
287 return new (Arena) til::LiteralPtr(VD); in translateDeclRefExpr()
312 auto *VD = getValueDeclFromSExpr(E); in hasCppPointerType() local
313 if (VD && VD->getType()->isPointerType()) in hasCppPointerType()
341 if (auto *VD = dyn_cast<CXXMethodDecl>(D)) in translateMemberExpr() local
342 D = getFirstVirtualDecl(VD); in translateMemberExpr()
474 const ValueDecl *VD = nullptr; in translateBinAssign() local
477 VD = DRE->getDecl(); in translateBinAssign()
478 CV = lookupVarDecl(VD); in translateBinAssign()
484 E1 = addStatement(E1, nullptr, VD); in translateBinAssign()
486 if (VD && CV) in translateBinAssign()
487 return updateVarDecl(VD, E1); in translateBinAssign()
590 if (VarDecl *VD = dyn_cast_or_null<VarDecl>(*I)) { in translateDeclStmt() local
591 Expr *E = VD->getInit(); in translateDeclStmt()
595 QualType T = VD->getType(); in translateDeclStmt()
596 if (T.isTrivialType(VD->getASTContext())) { in translateDeclStmt()
597 return addVarDecl(VD, SE); in translateDeclStmt()
612 const ValueDecl *VD) { in addStatement() argument
615 if (VD) in addStatement()
616 E = new (Arena) til::Variable(E, VD); in addStatement()
624 til::SExpr *SExprBuilder::lookupVarDecl(const ValueDecl *VD) { in lookupVarDecl() argument
625 auto It = LVarIdxMap.find(VD); in lookupVarDecl()
627 assert(CurrentLVarMap[It->second].first == VD); in lookupVarDecl()
634 static void maybeUpdateVD(til::SExpr *E, const ValueDecl *VD) { in maybeUpdateVD() argument
639 V->setClangDecl(VD); in maybeUpdateVD()
644 til::SExpr *SExprBuilder::addVarDecl(const ValueDecl *VD, til::SExpr *E) { in addVarDecl() argument
645 maybeUpdateVD(E, VD); in addVarDecl()
646 LVarIdxMap.insert(std::make_pair(VD, CurrentLVarMap.size())); in addVarDecl()
648 CurrentLVarMap.push_back(std::make_pair(VD, E)); in addVarDecl()
653 til::SExpr *SExprBuilder::updateVarDecl(const ValueDecl *VD, til::SExpr *E) { in updateVarDecl() argument
654 maybeUpdateVD(E, VD); in updateVarDecl()
655 auto It = LVarIdxMap.find(VD); in updateVarDecl()
657 til::SExpr *Ptr = new (Arena) til::LiteralPtr(VD); in updateVarDecl()
866 void SExprBuilder::handleDestructorCall(const VarDecl *VD, in handleDestructorCall() argument
868 til::SExpr *Sf = new (Arena) til::LiteralPtr(VD); in handleDestructorCall()