Lines Matching defs:Decl

87   for (const Decl *D : RecDecl.decls()) {
114 static bool hasNoName(const NamedDecl *Decl) {
115 return !Decl->getIdentifier() || Decl->getName().empty();
224 bool VisitCXXConstructorDecl(CXXConstructorDecl *Decl) {
225 if (Decl->isImplicit())
227 Check->addUsage(Decl->getParent(), Decl->getNameInfo().getSourceRange(),
230 for (const auto *Init : Decl->inits()) {
242 bool VisitCXXDestructorDecl(CXXDestructorDecl *Decl) {
243 if (Decl->isImplicit())
245 SourceRange Range = Decl->getNameInfo().getSourceRange();
252 Check->addUsage(Decl->getParent(), Range, SM);
256 bool VisitUsingDecl(UsingDecl *Decl) {
257 for (const auto *Shadow : Decl->shadows())
259 Decl->getNameInfo().getSourceRange(), SM);
263 bool VisitUsingDirectiveDecl(UsingDirectiveDecl *Decl) {
264 Check->addUsage(Decl->getNominatedNamespaceAsWritten(),
265 Decl->getIdentLocation(), SM);
269 bool VisitNamedDecl(NamedDecl *Decl) {
271 DeclarationNameInfo(Decl->getDeclName(), Decl->getLocation())
273 Check->addUsage(Decl, UsageRange, SM);
285 if (const NamespaceDecl *Decl = Spec->getAsNamespace())
286 Check->addUsage(Decl, Loc.getLocalSourceRange(), SM);
351 const TemplateDecl *Decl =
355 if (const auto *ClassDecl = dyn_cast<TemplateDecl>(Decl)) {
365 if (const TagDecl *Decl = Loc.getTypePtr()->getAsTagDecl())
366 Check->addUsage(Decl, Loc.getSourceRange(), SM);
454 void RenamerClangTidyCheck::addUsage(const NamedDecl *Decl,
457 if (hasNoName(Decl))
462 if (isa<ClassTemplateSpecializationDecl>(Decl))
470 const NamedDecl *FailureDecl = getFailureForNamedDecl(Decl);
580 const NamingCheckId &Decl = Pair.first;
587 auto DiagInfo = getDiagInfo(Decl, Failure);
588 auto Diag = diag(Decl.first,