• Home
  • Raw
  • Download

Lines Matching refs:D

75   void VisitDeclContext(const DeclContext *D);
76 void VisitFieldDecl(const FieldDecl *D);
77 void VisitFunctionDecl(const FunctionDecl *D);
78 void VisitNamedDecl(const NamedDecl *D);
79 void VisitNamespaceDecl(const NamespaceDecl *D);
80 void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D);
81 void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D);
82 void VisitClassTemplateDecl(const ClassTemplateDecl *D);
85 void VisitObjCPropertyDecl(const ObjCPropertyDecl *D);
86 void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D);
87 void VisitTagDecl(const TagDecl *D);
88 void VisitTypedefDecl(const TypedefDecl *D);
89 void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D);
90 void VisitVarDecl(const VarDecl *D);
91 void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D);
92 void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D);
93 void VisitLinkageSpecDecl(const LinkageSpecDecl *D) { in VisitLinkageSpecDecl() argument
96 void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D) { in VisitUsingDirectiveDecl() argument
99 void VisitUsingDecl(const UsingDecl *D) { in VisitUsingDecl() argument
102 void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D) { in VisitUnresolvedUsingValueDecl() argument
105 void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D) { in VisitUnresolvedUsingTypenameDecl() argument
109 bool ShouldGenerateLocation(const NamedDecl *D);
111 bool isLocal(const NamedDecl *D) { in isLocal() argument
112 return D->getParentFunctionOrMethod() != nullptr; in isLocal()
117 bool GenLoc(const Decl *D, bool IncludeOffset);
149 bool EmitDeclName(const NamedDecl *D);
158 bool USRGenerator::EmitDeclName(const NamedDecl *D) { in EmitDeclName() argument
161 D->printName(Out); in EmitDeclName()
167 bool USRGenerator::ShouldGenerateLocation(const NamedDecl *D) { in ShouldGenerateLocation() argument
168 if (D->isExternallyVisible()) in ShouldGenerateLocation()
170 if (D->getParentFunctionOrMethod()) in ShouldGenerateLocation()
173 return !SM.isInSystemHeader(D->getLocation()); in ShouldGenerateLocation()
177 if (const NamedDecl *D = dyn_cast<NamedDecl>(DC)) in VisitDeclContext() local
178 Visit(D); in VisitDeclContext()
181 void USRGenerator::VisitFieldDecl(const FieldDecl *D) { in VisitFieldDecl() argument
184 if (const ObjCInterfaceDecl *ID = Context->getObjContainingInterface(D)) in VisitFieldDecl()
187 VisitDeclContext(D->getDeclContext()); in VisitFieldDecl()
188 Out << (isa<ObjCIvarDecl>(D) ? "@" : "@FI@"); in VisitFieldDecl()
189 if (EmitDeclName(D)) { in VisitFieldDecl()
196 void USRGenerator::VisitFunctionDecl(const FunctionDecl *D) { in VisitFunctionDecl() argument
197 if (ShouldGenerateLocation(D) && GenLoc(D, /*IncludeOffset=*/isLocal(D))) in VisitFunctionDecl()
200 VisitDeclContext(D->getDeclContext()); in VisitFunctionDecl()
201 if (FunctionTemplateDecl *FunTmpl = D->getDescribedFunctionTemplate()) { in VisitFunctionDecl()
206 D->printName(Out); in VisitFunctionDecl()
209 if (!Ctx.getLangOpts().CPlusPlus || D->isExternC()) in VisitFunctionDecl()
213 SpecArgs = D->getTemplateSpecializationArgs()) { in VisitFunctionDecl()
223 for (auto PD : D->params()) { in VisitFunctionDecl()
227 if (D->isVariadic()) in VisitFunctionDecl()
230 if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) { in VisitFunctionDecl()
238 void USRGenerator::VisitNamedDecl(const NamedDecl *D) { in VisitNamedDecl() argument
239 VisitDeclContext(D->getDeclContext()); in VisitNamedDecl()
242 if (EmitDeclName(D)) { in VisitNamedDecl()
251 void USRGenerator::VisitVarDecl(const VarDecl *D) { in VisitVarDecl() argument
255 if (ShouldGenerateLocation(D) && GenLoc(D, /*IncludeOffset=*/isLocal(D))) in VisitVarDecl()
258 VisitDeclContext(D->getDeclContext()); in VisitVarDecl()
261 StringRef s = D->getName(); in VisitVarDecl()
274 const NonTypeTemplateParmDecl *D) { in VisitNonTypeTemplateParmDecl() argument
275 GenLoc(D, /*IncludeOffset=*/true); in VisitNonTypeTemplateParmDecl()
280 const TemplateTemplateParmDecl *D) { in VisitTemplateTemplateParmDecl() argument
281 GenLoc(D, /*IncludeOffset=*/true); in VisitTemplateTemplateParmDecl()
285 void USRGenerator::VisitNamespaceDecl(const NamespaceDecl *D) { in VisitNamespaceDecl() argument
286 if (D->isAnonymousNamespace()) { in VisitNamespaceDecl()
291 VisitDeclContext(D->getDeclContext()); in VisitNamespaceDecl()
293 Out << "@N@" << D->getName(); in VisitNamespaceDecl()
296 void USRGenerator::VisitFunctionTemplateDecl(const FunctionTemplateDecl *D) { in VisitFunctionTemplateDecl() argument
297 VisitFunctionDecl(D->getTemplatedDecl()); in VisitFunctionTemplateDecl()
300 void USRGenerator::VisitClassTemplateDecl(const ClassTemplateDecl *D) { in VisitClassTemplateDecl() argument
301 VisitTagDecl(D->getTemplatedDecl()); in VisitClassTemplateDecl()
304 void USRGenerator::VisitNamespaceAliasDecl(const NamespaceAliasDecl *D) { in VisitNamespaceAliasDecl() argument
305 VisitDeclContext(D->getDeclContext()); in VisitNamespaceAliasDecl()
307 Out << "@NA@" << D->getName(); in VisitNamespaceAliasDecl()
310 void USRGenerator::VisitObjCMethodDecl(const ObjCMethodDecl *D) { in VisitObjCMethodDecl() argument
311 const DeclContext *container = D->getDeclContext(); in VisitObjCMethodDecl()
318 const ObjCInterfaceDecl *ID = D->getClassInterface(); in VisitObjCMethodDecl()
328 Out << (D->isInstanceMethod() ? "(im)" : "(cm)") in VisitObjCMethodDecl()
329 << DeclarationName(D->getSelector()); in VisitObjCMethodDecl()
332 void USRGenerator::VisitObjCContainerDecl(const ObjCContainerDecl *D) { in VisitObjCContainerDecl() argument
333 switch (D->getKind()) { in VisitObjCContainerDecl()
338 GenObjCClass(D->getName()); in VisitObjCContainerDecl()
341 const ObjCCategoryDecl *CD = cast<ObjCCategoryDecl>(D); in VisitObjCContainerDecl()
363 const ObjCCategoryImplDecl *CD = cast<ObjCCategoryImplDecl>(D); in VisitObjCContainerDecl()
377 GenObjCProtocol(cast<ObjCProtocolDecl>(D)->getName()); in VisitObjCContainerDecl()
382 void USRGenerator::VisitObjCPropertyDecl(const ObjCPropertyDecl *D) { in VisitObjCPropertyDecl() argument
385 if (const ObjCInterfaceDecl *ID = Context->getObjContainingInterface(D)) in VisitObjCPropertyDecl()
388 Visit(cast<Decl>(D->getDeclContext())); in VisitObjCPropertyDecl()
389 GenObjCProperty(D->getName()); in VisitObjCPropertyDecl()
392 void USRGenerator::VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D) { in VisitObjCPropertyImplDecl() argument
393 if (ObjCPropertyDecl *PD = D->getPropertyDecl()) { in VisitObjCPropertyImplDecl()
401 void USRGenerator::VisitTagDecl(const TagDecl *D) { in VisitTagDecl() argument
404 if (ShouldGenerateLocation(D) && GenLoc(D, /*IncludeOffset=*/isLocal(D))) in VisitTagDecl()
407 D = D->getCanonicalDecl(); in VisitTagDecl()
408 VisitDeclContext(D->getDeclContext()); in VisitTagDecl()
411 if (const CXXRecordDecl *CXXRecord = dyn_cast<CXXRecordDecl>(D)) { in VisitTagDecl()
415 switch (D->getTagKind()) { in VisitTagDecl()
427 switch (D->getTagKind()) { in VisitTagDecl()
439 switch (D->getTagKind()) { in VisitTagDecl()
453 if (EmitDeclName(D)) { in VisitTagDecl()
454 if (const TypedefNameDecl *TD = D->getTypedefNameForAnonDecl()) { in VisitTagDecl()
464 = dyn_cast<ClassTemplateSpecializationDecl>(D)) { in VisitTagDecl()
474 void USRGenerator::VisitTypedefDecl(const TypedefDecl *D) { in VisitTypedefDecl() argument
475 if (ShouldGenerateLocation(D) && GenLoc(D, /*IncludeOffset=*/isLocal(D))) in VisitTypedefDecl()
477 const DeclContext *DC = D->getDeclContext(); in VisitTypedefDecl()
481 Out << D->getName(); in VisitTypedefDecl()
484 void USRGenerator::VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D) { in VisitTemplateTypeParmDecl() argument
485 GenLoc(D, /*IncludeOffset=*/true); in VisitTemplateTypeParmDecl()
489 bool USRGenerator::GenLoc(const Decl *D, bool IncludeOffset) { in GenLoc() argument
495 if (!D) { in GenLoc()
501 D = D->getCanonicalDecl(); in GenLoc()
504 IgnoreResults || printLoc(Out, D->getLocStart(), in GenLoc()
798 bool clang::index::generateUSRForDecl(const Decl *D, in generateUSRForDecl() argument
801 if (!D || D->getLocStart().isInvalid()) in generateUSRForDecl()
804 USRGenerator UG(&D->getASTContext(), Buf); in generateUSRForDecl()
805 UG.Visit(D); in generateUSRForDecl()