Lines Matching defs:To

133   void updateFlags(const Decl *From, Decl *To) {
134 // Check if some flags or attrs are new in 'From' and copy into 'To'.
136 if (From->isUsed(false) && !To->isUsed(false))
137 To->setIsUsed();
147 LLVM_NODISCARD Error importInto(ImportT &To, const ImportT &From) {
148 return Importer.importInto(To, From);
153 LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
156 To = cast_or_null<ImportT>(*ToOrErr);
404 const DeclarationNameInfo &From, DeclarationNameInfo &To);
408 Error ImportImplicitMethods(const CXXRecordDecl *From, CXXRecordDecl *To);
432 Error ImportInitializer(VarDecl *From, VarDecl *To);
434 RecordDecl *From, RecordDecl *To,
437 EnumDecl *From, EnumDecl *To,
440 ObjCInterfaceDecl *From, ObjCInterfaceDecl *To,
443 ObjCProtocolDecl *From, ObjCProtocolDecl *To,
479 bool IsStructuralMatch(Decl *From, Decl *To, bool Complain);
487 FunctionTemplateDecl *To);
488 bool IsStructuralMatch(FunctionDecl *From, FunctionDecl *To);
489 bool IsStructuralMatch(ClassTemplateDecl *From, ClassTemplateDecl *To);
490 bool IsStructuralMatch(VarTemplateDecl *From, VarTemplateDecl *To);
758 SmallVector<NamedDecl *, 4> To(From->size());
759 if (Error Err = ImportContainerChecked(*From, To))
780 To,
1689 const DeclarationNameInfo &From, DeclarationNameInfo& To) {
1690 // NOTE: To.Name and To.Loc are already imported.
1691 // We only have to import To.LocInfo.
1692 switch (To.getName().getNameKind()) {
1703 To.setCXXOperatorNameRange(*ToRangeOrErr);
1710 To.setCXXLiteralOperatorNameLoc(*LocOrErr);
1719 To.setNamedTypeInfo(*ToTInfoOrErr);
1861 const CXXRecordDecl *From, CXXRecordDecl *To) {
1862 assert(From->isCompleteDefinition() && To->getDefinition() == To &&
1875 static Error setTypedefNameForAnonDecl(TagDecl *From, TagDecl *To,
1879 To->setTypedefNameForAnonDecl(cast<TypedefNameDecl>(*ToTypedefOrErr));
1887 RecordDecl *From, RecordDecl *To, ImportDefinitionKind Kind) {
1888 auto DefinitionCompleter = [To]() {
1895 To->setCompleteDefinition(false);
1896 To->completeDefinition();
1899 if (To->getDefinition() || To->isBeingDefined()) {
1905 (To->isLambda() && shouldForceImportDeclContext(Kind))) {
1908 if (To->isLambda())
1916 To->startDefinition();
1923 if (Error Err = setTypedefNameForAnonDecl(From, To, Importer))
1927 auto *ToCXX = dyn_cast<CXXRecordDecl>(To);
1988 Error ASTNodeImporter::ImportInitializer(VarDecl *From, VarDecl *To) {
1989 if (To->getAnyInitializer())
2000 To->setInit(*ToInitOrErr);
2002 EvaluatedStmt *Eval = To->ensureEvaluatedStmt();
2012 EnumDecl *From, EnumDecl *To, ImportDefinitionKind Kind) {
2013 if (To->getDefinition() || To->isBeingDefined()) {
2019 To->startDefinition();
2021 if (Error Err = setTypedefNameForAnonDecl(From, To, Importer))
2039 To->completeDefinition(*ToTypeOrErr, *ToPromotionTypeOrErr,
2082 bool ASTNodeImporter::IsStructuralMatch(Decl *From, Decl *To, bool Complain) {
2087 return Ctx.IsEquivalent(From, To);
2132 FunctionTemplateDecl *To) {
2137 return Ctx.IsEquivalent(From, To);
2140 bool ASTNodeImporter::IsStructuralMatch(FunctionDecl *From, FunctionDecl *To) {
2145 return Ctx.IsEquivalent(From, To);
2159 ClassTemplateDecl *To) {
2164 return Ctx.IsEquivalent(From, To);
2168 VarTemplateDecl *To) {
2173 return Ctx.IsEquivalent(From, To);
3259 // the import. To avoid an infinite recursion when importing, we create the
3268 // To avoid an infinite recursion when importing, create the FunctionDecl
3277 // To avoid an infinite recursion when importing, create the FunctionDecl
3393 // "To" context the existing function may have exception specification with
3531 // "To" context. However, the "From" context might instantiated that,
3827 // "To" context we already have a definition.
3835 // "To" context we already have an initializer.
4278 ObjCProtocolDecl *From, ObjCProtocolDecl *To, ImportDefinitionKind Kind) {
4279 if (To->getDefinition()) {
4287 To->startDefinition();
4311 To->setProtocolList(Protocols.data(), Protocols.size(),
4633 ObjCInterfaceDecl *From, ObjCInterfaceDecl *To, ImportDefinitionKind Kind) {
4634 if (To->getDefinition()) {
4644 ObjCInterfaceDecl *ToSuper = To->getSuperClass();
4647 Importer.ToDiag(To->getLocation(),
4649 << To->getDeclName();
4651 Importer.ToDiag(To->getSuperClassLoc(), diag::note_odr_objc_superclass)
4652 << To->getSuperClass()->getDeclName();
4654 Importer.ToDiag(To->getLocation(),
4672 To->startDefinition();
4677 To->setSuperClass(*SuperTInfoOrErr);
4705 To->setProtocolList(Protocols.data(), Protocols.size(),
4720 To->setImplementation(*ToImplOrErr);
5387 // instantiated in the "From" context, but not in the "To" context.
5395 // "From" context, but not in the "To" context.
7215 LifetimeExtendedTemporaryDecl *To;
7216 if (GetImportedOrCreateDecl(To, D, Temporary, ExtendingDecl,
7218 return To;
7220 To->setLexicalDeclContext(LexicalDC);
7221 LexicalDC->addDeclInternal(To);
7222 return To;
7793 InitListExpr *To = new (ToCtx) InitListExpr(
7795 To->setType(ToType);
7799 To->setArrayFiller(*ToFillerOrErr);
7806 To->setInitializedFieldInUnion(*ToFDOrErr);
7813 To->setSyntacticForm(*ToSyntFormOrErr);
7820 To->sawArrayRangeDesignator(E->hadArrayRangeDesignator());
7822 return To;
8828 Decl *To = *ToOrErr;
8833 if (auto *ToRecord = dyn_cast<RecordDecl>(To)) {
8841 if (auto *ToEnum = dyn_cast<EnumDecl>(To)) {
8848 if (auto *ToIFace = dyn_cast<ObjCInterfaceDecl>(To)) {
8856 if (auto *ToProto = dyn_cast<ObjCProtocolDecl>(To)) {
9003 Decl *ASTImporter::MapImported(Decl *From, Decl *To) {
9005 assert((Pos == ImportedDecls.end() || Pos->second == To) &&
9009 ImportedDecls[From] = To;
9012 ImportedFromDecls[To] = From;
9013 AddToLookupTable(To);
9014 return To;
9034 bool ASTImporter::IsStructurallyEquivalent(QualType From, QualType To,
9040 if (ToContext.hasSameType(*ToFromOrErr, To))
9050 return Ctx.IsEquivalent(From, To);