Lines Matching refs:VD
446 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) { in ShouldRemoveFromUnused() local
452 if (VD->isReferenced() && in ShouldRemoveFromUnused()
453 VD->isUsableInConstantExpressions(SemaRef->Context)) in ShouldRemoveFromUnused()
458 const VarDecl *DeclToCheck = VD->getDefinition(); in ShouldRemoveFromUnused()
464 DeclToCheck = VD->getMostRecentDecl(); in ShouldRemoveFromUnused()
465 if (DeclToCheck != VD) in ShouldRemoveFromUnused()
492 auto *VD = cast<VarDecl>(ND); in getUndefinedButUsed() local
493 if (VD->hasDefinition() != VarDecl::DeclarationOnly) in getUndefinedButUsed()
495 if (VD->isExternallyVisible() && !VD->getMostRecentDecl()->isInline()) in getUndefinedButUsed()
794 VarDecl *VD = (*T)->getActingDefinition(); in ActOnEndOfTranslationUnit() local
799 if (!VD || VD->isInvalidDecl() || !Seen.insert(VD).second) in ActOnEndOfTranslationUnit()
803 = Context.getAsIncompleteArrayType(VD->getType())) { in ActOnEndOfTranslationUnit()
805 Diag(VD->getLocation(), diag::warn_tentative_incomplete_array); in ActOnEndOfTranslationUnit()
809 VD->setType(T); in ActOnEndOfTranslationUnit()
810 } else if (RequireCompleteType(VD->getLocation(), VD->getType(), in ActOnEndOfTranslationUnit()
812 VD->setInvalidDecl(); in ActOnEndOfTranslationUnit()
814 CheckCompleteVariableDeclaration(VD); in ActOnEndOfTranslationUnit()
817 if (!VD->isInvalidDecl()) in ActOnEndOfTranslationUnit()
818 Consumer.CompleteTentativeDefinition(VD); in ActOnEndOfTranslationUnit()