Home | History | Annotate | Download | only in Analysis

Lines Matching defs:VD

274   const auto *VD = cast<ValueDecl>(DRE->getDecl()->getCanonicalDecl());
277 if (const auto *PV = dyn_cast<ParmVarDecl>(VD)) {
292 VD = isa<FunctionDecl>(D)
298 return new (Arena) til::LiteralPtr(VD);
323 auto *VD = getValueDeclFromSExpr(E);
324 if (VD && VD->getType()->isAnyPointerType())
351 if (const auto *VD = dyn_cast<CXXMethodDecl>(D))
352 D = getFirstVirtualDecl(VD);
498 const ValueDecl *VD = nullptr;
501 VD = DRE->getDecl();
502 CV = lookupVarDecl(VD);
508 E1 = addStatement(E1, nullptr, VD);
510 if (VD && CV)
511 return updateVarDecl(VD, E1);
615 if (auto *VD = dyn_cast_or_null<VarDecl>(I)) {
616 Expr *E = VD->getInit();
620 QualType T = VD->getType();
621 if (T.isTrivialType(VD->getASTContext()))
622 return addVarDecl(VD, SE);
636 const ValueDecl *VD) {
639 if (VD)
640 E = new (Arena) til::Variable(E, VD);
647 // Returns the current value of VD, if known, and nullptr otherwise.
648 til::SExpr *SExprBuilder::lookupVarDecl(const ValueDecl *VD) {
649 auto It = LVarIdxMap.find(VD);
651 assert(CurrentLVarMap[It->second].first == VD);
658 static void maybeUpdateVD(til::SExpr *E, const ValueDecl *VD) {
663 V->setClangDecl(VD);
668 til::SExpr *SExprBuilder::addVarDecl(const ValueDecl *VD, til::SExpr *E) {
669 maybeUpdateVD(E, VD);
670 LVarIdxMap.insert(std::make_pair(VD, CurrentLVarMap.size()));
672 CurrentLVarMap.push_back(std::make_pair(VD, E));
677 til::SExpr *SExprBuilder::updateVarDecl(const ValueDecl *VD, til::SExpr *E) {
678 maybeUpdateVD(E, VD);
679 auto It = LVarIdxMap.find(VD);
681 til::SExpr *Ptr = new (Arena) til::LiteralPtr(VD);
888 void SExprBuilder::handleDestructorCall(const VarDecl *VD,
890 til::SExpr *Sf = new (Arena) til::LiteralPtr(VD);