Lines Matching refs:Decl
63 const auto *Decl = Result.Nodes.getNodeAs<FriendDecl>("friend_decl"); in check() local
64 assert(Decl && "Decl is neither record_decl nor friend decl!"); in check()
75 if (const TypeSourceInfo *Tsi = Decl->getFriendType()) { in check()
90 if (ParentDecl1->getDeclKind() == Decl::TranslationUnit || in haveSameNamespaceOrTranslationUnit()
91 ParentDecl2->getDeclKind() == Decl::TranslationUnit) { in haveSameNamespaceOrTranslationUnit()
94 assert(ParentDecl1->getDeclKind() == Decl::Namespace && in haveSameNamespaceOrTranslationUnit()
96 assert(ParentDecl2->getDeclKind() == Decl::Namespace && in haveSameNamespaceOrTranslationUnit()
103 static std::string getNameOfNamespace(const CXXRecordDecl *Decl) { in getNameOfNamespace() argument
104 const auto *ParentDecl = Decl->getLexicalParent(); in getNameOfNamespace()
105 if (ParentDecl->getDeclKind() == Decl::TranslationUnit) { in getNameOfNamespace()
134 for (const auto *Decl : Declarations) { in onEndOfTranslationUnit() local
135 if (Decl == CurDecl) { in onEndOfTranslationUnit()
139 !haveSameNamespaceOrTranslationUnit(CurDecl, Decl)) { in onEndOfTranslationUnit()
143 << CurDecl << getNameOfNamespace(Decl); in onEndOfTranslationUnit()
144 diag(Decl->getLocation(), "a declaration of %0 is found here", in onEndOfTranslationUnit()
146 << Decl; in onEndOfTranslationUnit()