Lines Matching refs:FromD
154 ChildErrorHandlingStrategy(const Decl *FromD) in ChildErrorHandlingStrategy() argument
155 : FromDC(dyn_cast<DeclContext>(FromD)), in ChildErrorHandlingStrategy()
156 IgnoreChildErrors(!isa<TagDecl>(FromD)) {} in ChildErrorHandlingStrategy()
246 [[nodiscard]] bool GetImportedOrCreateDecl(ToDeclT *&ToD, FromDeclT *FromD, in GetImportedOrCreateDecl() argument
252 return GetImportedOrCreateSpecialDecl(ToD, OC, FromD, in GetImportedOrCreateDecl()
262 [[nodiscard]] bool GetImportedOrCreateDecl(ToDeclT *&ToD, FromDeclT *FromD, in GetImportedOrCreateDecl() argument
265 return GetImportedOrCreateSpecialDecl(ToD, OC, FromD, in GetImportedOrCreateDecl()
274 FromDeclT *FromD, Args &&...args) { in GetImportedOrCreateSpecialDecl() argument
275 if (Importer.getImportDeclErrorIfAny(FromD)) { in GetImportedOrCreateSpecialDecl()
279 ToD = cast_or_null<ToDeclT>(Importer.GetAlreadyImportedOrNull(FromD)); in GetImportedOrCreateSpecialDecl()
284 Importer.RegisterImportedDecl(FromD, ToD); in GetImportedOrCreateSpecialDecl()
286 InitializeImportedDecl(FromD, ToD); in GetImportedOrCreateSpecialDecl()
290 void InitializeImportedDecl(Decl *FromD, Decl *ToD) { in InitializeImportedDecl() argument
291 ToD->IdentifierNamespace = FromD->IdentifierNamespace; in InitializeImportedDecl()
292 if (FromD->isUsed()) in InitializeImportedDecl()
294 if (FromD->isImplicit()) in InitializeImportedDecl()
308 void addDeclToContexts(Decl *FromD, Decl *ToD) { in addDeclToContexts() argument
313 if (!FromD->getDescribedTemplate() && in addDeclToContexts()
314 FromD->getFriendObjectKind() == Decl::FOK_None) in addDeclToContexts()
319 DeclContext *FromDC = FromD->getDeclContext(); in addDeclToContexts()
320 DeclContext *FromLexicalDC = FromD->getLexicalDeclContext(); in addDeclToContexts()
325 if (FromDC->containsDeclAndLoad(FromD)) { in addDeclToContexts()
329 if (ToDC != ToLexicalDC && FromLexicalDC->containsDeclAndLoad(FromD)) { in addDeclToContexts()
337 if (auto *FromNamed = dyn_cast<NamedDecl>(FromD)) { in addDeclToContexts()
381 Error ImportDefinitionIfNeeded(Decl *FromD, Decl *ToD = nullptr);
448 Error ImportTemplateParameterLists(const DeclTy *FromD, DeclTy *ToD);
924 for (Decl *FromD : DG) { in import()
925 if (auto ToDOrErr = import(FromD)) in import()
1945 Error ASTNodeImporter::ImportDefinitionIfNeeded(Decl *FromD, Decl *ToD) { in ImportDefinitionIfNeeded() argument
1946 if (!FromD) in ImportDefinitionIfNeeded()
1950 if (Error Err = importInto(ToD, FromD)) in ImportDefinitionIfNeeded()
1953 if (RecordDecl *FromRecord = dyn_cast<RecordDecl>(FromD)) { in ImportDefinitionIfNeeded()
1964 if (EnumDecl *FromEnum = dyn_cast<EnumDecl>(FromD)) { in ImportDefinitionIfNeeded()
2166 Decl *FromD, DeclContext *&ToDC, DeclContext *&ToLexicalDC) { in ImportDeclContext() argument
2167 auto ToDCOrErr = Importer.ImportContext(FromD->getDeclContext()); in ImportDeclContext()
2172 if (FromD->getDeclContext() != FromD->getLexicalDeclContext()) { in ImportDeclContext()
2174 FromD->getLexicalDeclContext()); in ImportDeclContext()
3336 Error ASTNodeImporter::ImportTemplateParameterLists(const DeclTy *FromD, in ImportTemplateParameterLists() argument
3338 unsigned int Num = FromD->getNumTemplateParameterLists(); in ImportTemplateParameterLists()
3344 import(FromD->getTemplateParameterList(I))) in ImportTemplateParameterLists()
9039 Expected<Decl *> ASTImporter::ImportImpl(Decl *FromD) { in ImportImpl() argument
9042 return Importer.Visit(FromD); in ImportImpl()
9045 void ASTImporter::RegisterImportedDecl(Decl *FromD, Decl *ToD) { in RegisterImportedDecl() argument
9046 MapImported(FromD, ToD); in RegisterImportedDecl()
9393 Decl *ASTImporter::GetAlreadyImportedOrNull(const Decl *FromD) const { in GetAlreadyImportedOrNull()
9394 return ImportedDecls.lookup(FromD); in GetAlreadyImportedOrNull()
9404 Error ASTImporter::ImportAttrs(Decl *ToD, Decl *FromD) { in ImportAttrs() argument
9405 if (!FromD->hasAttrs() || ToD->hasAttrs()) in ImportAttrs()
9407 for (const Attr *FromAttr : FromD->getAttrs()) { in ImportAttrs()
9417 Expected<Decl *> ASTImporter::Import(Decl *FromD) { in Import() argument
9418 if (!FromD) in Import()
9422 ImportPath.push(FromD); in Import()
9428 if (auto Error = getImportDeclErrorIfAny(FromD)) in Import()
9432 Decl *ToD = GetAlreadyImportedOrNull(FromD); in Import()
9436 setImportDeclError(FromD, *Error); in Import()
9441 updateFlags(FromD, ToD); in Import()
9445 SavedImportPaths[FromD].push_back(ImportPath.copyCycleAtBack()); in Import()
9450 ExpectedDecl ToDOrErr = ImportImpl(FromD); in Import()
9454 auto Pos = ImportedDecls.find(FromD); in Import()
9492 setImportDeclError(FromD, ErrOut); in Import()
9499 for (const auto &Path : SavedImportPaths[FromD]) { in Import()
9502 Decl *PrevFromDi = FromD; in Import()
9505 if (FromDi == FromD) in Import()
9523 SavedImportPaths.erase(FromD); in Import()
9536 auto Err = getImportDeclErrorIfAny(FromD); in Import()
9545 setImportDeclError(FromD, *Error); in Import()
9549 assert(ImportedDecls.count(FromD) != 0 && "Missing call to MapImported?"); in Import()
9550 if (auto Error = ImportAttrs(ToD, FromD)) in Import()
9554 Imported(FromD, ToD); in Import()
9556 updateFlags(FromD, ToD); in Import()
9557 SavedImportPaths.erase(FromD); in Import()
10471 ASTImporter::getImportDeclErrorIfAny(Decl *FromD) const { in getImportDeclErrorIfAny()
10472 auto Pos = ImportDeclErrors.find(FromD); in getImportDeclErrorIfAny()