Lines Matching defs:VD

67   if (VarDecl *VD = dyn_cast<VarDecl>(D))
68 if (Expr *Ex = VD->getInit())
324 void addVar(VarDecl *VD) {
325 Vars.push_back(VD, ctx);
640 void maybeAddScopeBeginForVarDecl(CFGBlock *B, const VarDecl *VD,
642 if (ScopePos && (VD == ScopePos.getFirstVarInScope()))
643 appendScopeBegin(B, VD, S);
793 LocalScope* addLocalScopeForVarDecl(VarDecl *VD, LocalScope* Scope = nullptr);
880 void appendAutomaticObjDtor(CFGBlock *B, VarDecl *VD, Stmt *S) {
881 B->appendAutomaticObjDtor(VD, S, cfg->getBumpVectorContext());
884 void appendCleanupFunction(CFGBlock *B, VarDecl *VD) {
885 B->appendCleanupFunction(VD, cfg->getBumpVectorContext());
888 void appendLifetimeEnds(CFGBlock *B, VarDecl *VD, Stmt *S) {
889 B->appendLifetimeEnds(VD, S, cfg->getBumpVectorContext());
912 void appendScopeBegin(CFGBlock *B, const VarDecl *VD, const Stmt *S) {
914 B->appendScopeBegin(VD, S, cfg->getBumpVectorContext());
917 void appendScopeEnd(CFGBlock *B, const VarDecl *VD, const Stmt *S) {
919 B->appendScopeEnd(VD, S, cfg->getBumpVectorContext());
1353 bool hasTrivialDestructor(const VarDecl *VD) const;
1354 bool needsAutomaticDestruction(const VarDecl *VD) const;
1873 for (VarDecl *VD : llvm::reverse(DeclsNeedDestruction)) {
1879 QualType Ty = VD->getType();
1881 Ty = getReferenceInitTemporaryType(VD->getInit());
1895 appendLifetimeEnds(Block, VD, S);
1896 if (BuildOpts.AddImplicitDtors && !hasTrivialDestructor(VD))
1897 appendAutomaticObjDtor(Block, VD, S);
1898 if (VD->hasAttr<CleanupAttr>())
1899 appendCleanupFunction(Block, VD);
1937 for (VarDecl *VD : llvm::reverse(DeclsTrivial))
1938 appendLifetimeEnds(Block, VD, S);
2098 if (VarDecl *VD = dyn_cast<VarDecl>(DI))
2099 Scope = addLocalScopeForVarDecl(VD, Scope);
2103 bool CFGBuilder::needsAutomaticDestruction(const VarDecl *VD) const {
2104 return !hasTrivialDestructor(VD) || VD->hasAttr<CleanupAttr>();
2107 bool CFGBuilder::hasTrivialDestructor(const VarDecl *VD) const {
2109 QualType QT = VD->getType();
2119 const Expr *Init = VD->getInit();
2150 LocalScope* CFGBuilder::addLocalScopeForVarDecl(VarDecl *VD,
2157 if (!VD->hasLocalStorage())
2161 !needsAutomaticDestruction(VD)) {
2168 Scope->addVar(VD);
2960 VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl());
2962 if (!VD) {
2973 if (BuildOpts.AddStaticInitBranches && VD->isStaticLocal()) {
2987 Expr *Init = VD->getInit();
3001 if (const auto *DD = dyn_cast<DecompositionDecl>(VD)) {
3003 if (auto *VD = BD->getHoldingVar()) {
3004 DeclGroupRef DG(VD);
3006 new (Context) DeclStmt(DG, VD->getLocation(), GetEndLoc(VD));
3043 // If the type of VD is a VLA, then we must process its size expressions.
3046 for (const VariableArrayType* VA = FindVA(VD->getType().getTypePtr());
3052 maybeAddScopeBeginForVarDecl(Block, VD, DS);
3055 if (ScopePos && VD == *ScopePos)
3089 if (VarDecl *VD = I->getConditionVariable())
3090 addLocalScopeForVarDecl(VD);
3509 if (VarDecl *VD = F->getConditionVariable())
3510 addLocalScopeForVarDecl(VD);
3625 if (VarDecl *VD = F->getConditionVariable()) {
3626 if (Expr *Init = VD->getInit()) {
3636 maybeAddScopeBeginForVarDecl(EntryConditionBlock, VD, C);
3867 if (VarDecl *VD = W->getConditionVariable()) {
3868 addLocalScopeForVarDecl(VD);
3950 if (VarDecl *VD = W->getConditionVariable()) {
3951 if (Expr *Init = VD->getInit()) {
3962 maybeAddScopeBeginForVarDecl(EntryConditionBlock, VD, C);
4344 if (VarDecl *VD = Terminator->getConditionVariable())
4345 addLocalScopeForVarDecl(VD);
4420 if (VarDecl *VD = Terminator->getConditionVariable()) {
4421 if (Expr *Init = VD->getInit()) {
4425 maybeAddScopeBeginForVarDecl(LastBlock, VD, Init);
4632 if (VarDecl *VD = CS->getExceptionDecl()) {
4634 addLocalScopeForVarDecl(VD);
5544 VarDecl *VD = cast<VarDecl>(DS->getSingleDecl());
5545 OS << "static init " << VD->getName();
5830 const VarDecl *VD = DE.getVarDecl();
5831 Helper.handleDecl(VD, OS);
5833 QualType T = VD->getType();
5835 T = getReferenceInitTemporaryType(VD->getInit(), nullptr);
5859 if (const VarDecl *VD = E.castAs<CFGScopeBegin>().getVarDecl())
5860 OS << VD->getQualifiedNameAsString();
5866 if (const VarDecl *VD = E.castAs<CFGScopeEnd>().getVarDecl())
5867 OS << VD->getQualifiedNameAsString();