Lines Matching refs:Importer
32 ASTImporter &Importer; member in clang::ASTNodeImporter
35 explicit ASTNodeImporter(ASTImporter &Importer) : Importer(Importer) { } in ASTNodeImporter() argument
105 (IDK == IDK_Default && !Importer.isMinimalImport()); in shouldForceImportDeclContext()
1342 Importer.FromDiag(SourceLocation(), diag::err_unsupported_ast_node) in VisitType()
1351 case BuiltinType::Id: return Importer.getToContext().SingletonId; in VisitBuiltinType()
1364 if (Importer.getToContext().getLangOpts().CharIsSigned) in VisitBuiltinType()
1365 return Importer.getToContext().UnsignedCharTy; in VisitBuiltinType()
1367 return Importer.getToContext().CharTy; in VisitBuiltinType()
1373 if (!Importer.getToContext().getLangOpts().CharIsSigned) in VisitBuiltinType()
1374 return Importer.getToContext().SignedCharTy; in VisitBuiltinType()
1376 return Importer.getToContext().CharTy; in VisitBuiltinType()
1382 return Importer.getToContext().WCharTy; in VisitBuiltinType()
1389 QualType ToElementType = Importer.Import(T->getElementType()); in VisitComplexType()
1393 return Importer.getToContext().getComplexType(ToElementType); in VisitComplexType()
1397 QualType ToPointeeType = Importer.Import(T->getPointeeType()); in VisitPointerType()
1401 return Importer.getToContext().getPointerType(ToPointeeType); in VisitPointerType()
1406 QualType ToPointeeType = Importer.Import(T->getPointeeType()); in VisitBlockPointerType()
1410 return Importer.getToContext().getBlockPointerType(ToPointeeType); in VisitBlockPointerType()
1416 QualType ToPointeeType = Importer.Import(T->getPointeeTypeAsWritten()); in VisitLValueReferenceType()
1420 return Importer.getToContext().getLValueReferenceType(ToPointeeType); in VisitLValueReferenceType()
1426 QualType ToPointeeType = Importer.Import(T->getPointeeTypeAsWritten()); in VisitRValueReferenceType()
1430 return Importer.getToContext().getRValueReferenceType(ToPointeeType); in VisitRValueReferenceType()
1435 QualType ToPointeeType = Importer.Import(T->getPointeeType()); in VisitMemberPointerType()
1439 QualType ClassType = Importer.Import(QualType(T->getClass(), 0)); in VisitMemberPointerType()
1440 return Importer.getToContext().getMemberPointerType(ToPointeeType, in VisitMemberPointerType()
1445 QualType ToElementType = Importer.Import(T->getElementType()); in VisitConstantArrayType()
1449 return Importer.getToContext().getConstantArrayType(ToElementType, in VisitConstantArrayType()
1457 QualType ToElementType = Importer.Import(T->getElementType()); in VisitIncompleteArrayType()
1461 return Importer.getToContext().getIncompleteArrayType(ToElementType, in VisitIncompleteArrayType()
1467 QualType ToElementType = Importer.Import(T->getElementType()); in VisitVariableArrayType()
1471 Expr *Size = Importer.Import(T->getSizeExpr()); in VisitVariableArrayType()
1475 SourceRange Brackets = Importer.Import(T->getBracketsRange()); in VisitVariableArrayType()
1476 return Importer.getToContext().getVariableArrayType(ToElementType, Size, in VisitVariableArrayType()
1483 QualType ToElementType = Importer.Import(T->getElementType()); in VisitVectorType()
1487 return Importer.getToContext().getVectorType(ToElementType, in VisitVectorType()
1493 QualType ToElementType = Importer.Import(T->getElementType()); in VisitExtVectorType()
1497 return Importer.getToContext().getExtVectorType(ToElementType, in VisitExtVectorType()
1505 QualType ToResultType = Importer.Import(T->getResultType()); in VisitFunctionNoProtoType()
1509 return Importer.getToContext().getFunctionNoProtoType(ToResultType, in VisitFunctionNoProtoType()
1514 QualType ToResultType = Importer.Import(T->getResultType()); in VisitFunctionProtoType()
1523 QualType ArgType = Importer.Import(*A); in VisitFunctionProtoType()
1534 QualType ExceptionType = Importer.Import(*E); in VisitFunctionProtoType()
1543 return Importer.getToContext().getFunctionType(ToResultType, ArgTypes.data(), in VisitFunctionProtoType()
1548 QualType ToInnerType = Importer.Import(T->getInnerType()); in VisitParenType()
1552 return Importer.getToContext().getParenType(ToInnerType); in VisitParenType()
1557 = dyn_cast_or_null<TypedefNameDecl>(Importer.Import(T->getDecl())); in VisitTypedefType()
1561 return Importer.getToContext().getTypeDeclType(ToDecl); in VisitTypedefType()
1565 Expr *ToExpr = Importer.Import(T->getUnderlyingExpr()); in VisitTypeOfExprType()
1569 return Importer.getToContext().getTypeOfExprType(ToExpr); in VisitTypeOfExprType()
1573 QualType ToUnderlyingType = Importer.Import(T->getUnderlyingType()); in VisitTypeOfType()
1577 return Importer.getToContext().getTypeOfType(ToUnderlyingType); in VisitTypeOfType()
1582 Expr *ToExpr = Importer.Import(T->getUnderlyingExpr()); in VisitDecltypeType()
1586 QualType UnderlyingType = Importer.Import(T->getUnderlyingType()); in VisitDecltypeType()
1590 return Importer.getToContext().getDecltypeType(ToExpr, UnderlyingType); in VisitDecltypeType()
1594 QualType ToBaseType = Importer.Import(T->getBaseType()); in VisitUnaryTransformType()
1595 QualType ToUnderlyingType = Importer.Import(T->getUnderlyingType()); in VisitUnaryTransformType()
1599 return Importer.getToContext().getUnaryTransformType(ToBaseType, in VisitUnaryTransformType()
1609 ToDeduced = Importer.Import(FromDeduced); in VisitAutoType()
1614 return Importer.getToContext().getAutoType(ToDeduced); in VisitAutoType()
1619 = dyn_cast_or_null<RecordDecl>(Importer.Import(T->getDecl())); in VisitRecordType()
1623 return Importer.getToContext().getTagDeclType(ToDecl); in VisitRecordType()
1628 = dyn_cast_or_null<EnumDecl>(Importer.Import(T->getDecl())); in VisitEnumType()
1632 return Importer.getToContext().getTagDeclType(ToDecl); in VisitEnumType()
1637 TemplateName ToTemplate = Importer.Import(T->getTemplateName()); in VisitTemplateSpecializationType()
1648 = Importer.getFromContext().getCanonicalType(QualType(T, 0)); in VisitTemplateSpecializationType()
1649 ToCanonType =Importer.Import(FromCanonType); in VisitTemplateSpecializationType()
1653 return Importer.getToContext().getTemplateSpecializationType(ToTemplate, in VisitTemplateSpecializationType()
1663 ToQualifier = Importer.Import(T->getQualifier()); in VisitElaboratedType()
1668 QualType ToNamedType = Importer.Import(T->getNamedType()); in VisitElaboratedType()
1672 return Importer.getToContext().getElaboratedType(T->getKeyword(), in VisitElaboratedType()
1678 = dyn_cast_or_null<ObjCInterfaceDecl>(Importer.Import(T->getDecl())); in VisitObjCInterfaceType()
1682 return Importer.getToContext().getObjCInterfaceType(Class); in VisitObjCInterfaceType()
1686 QualType ToBaseType = Importer.Import(T->getBaseType()); in VisitObjCObjectType()
1695 = dyn_cast_or_null<ObjCProtocolDecl>(Importer.Import(*P)); in VisitObjCObjectType()
1701 return Importer.getToContext().getObjCObjectType(ToBaseType, in VisitObjCObjectType()
1708 QualType ToPointeeType = Importer.Import(T->getPointeeType()); in VisitObjCObjectPointerType()
1712 return Importer.getToContext().getObjCObjectPointerType(ToPointeeType); in VisitObjCObjectPointerType()
1723 DC = Importer.ImportContext(D->getDeclContext()); in ImportDeclParts()
1729 LexicalDC = Importer.ImportContext(D->getLexicalDeclContext()); in ImportDeclParts()
1735 Name = Importer.Import(D->getDeclName()); in ImportDeclParts()
1740 Loc = Importer.Import(D->getLocation()); in ImportDeclParts()
1749 ToD = Importer.Import(FromD); in ImportDefinitionIfNeeded()
1788 To.setCXXOperatorNameRange(Importer.Import(Range)); in ImportDeclarationNameLoc()
1793 To.setCXXLiteralOperatorNameLoc(Importer.Import(Loc)); in ImportDeclarationNameLoc()
1800 To.setNamedTypeInfo(Importer.Import(FromTInfo)); in ImportDeclarationNameLoc()
1808 if (Importer.isMinimalImport() && !ForceImport) { in ImportDeclContext()
1809 Importer.ImportContext(FromDC); in ImportDeclContext()
1817 Importer.Import(*From); in ImportDeclContext()
1896 QualType T = Importer.Import(Base1->getType()); in ImportDefinition()
1902 EllipsisLoc = Importer.Import(Base1->getEllipsisLoc()); in ImportDefinition()
1908 new (Importer.getToContext()) in ImportDefinition()
1909 CXXBaseSpecifier(Importer.Import(Base1->getSourceRange()), in ImportDefinition()
1913 Importer.Import(Base1->getTypeSourceInfo()), in ImportDefinition()
1937 QualType T = Importer.Import(Importer.getFromContext().getTypeDeclType(From)); in ImportDefinition()
1941 QualType ToPromotionType = Importer.Import(From->getPromotionType()); in ImportDefinition()
1963 Decl *To = Importer.Import(*P); in ImportTemplateParameterList()
1970 return TemplateParameterList::Create(Importer.getToContext(), in ImportTemplateParameterList()
1971 Importer.Import(Params->getTemplateLoc()), in ImportTemplateParameterList()
1972 Importer.Import(Params->getLAngleLoc()), in ImportTemplateParameterList()
1974 Importer.Import(Params->getRAngleLoc())); in ImportTemplateParameterList()
1984 QualType ToType = Importer.Import(From.getAsType()); in ImportTemplateArgument()
1991 QualType ToType = Importer.Import(From.getIntegralType()); in ImportTemplateArgument()
1998 if (Decl *To = Importer.Import(From.getAsDecl())) in ImportTemplateArgument()
2003 TemplateName ToTemplate = Importer.Import(From.getAsTemplate()); in ImportTemplateArgument()
2012 = Importer.Import(From.getAsTemplateOrTemplatePattern()); in ImportTemplateArgument()
2020 if (Expr *ToExpr = Importer.Import(From.getAsExpr())) in ImportTemplateArgument()
2031 = new (Importer.getToContext()) TemplateArgument[ToPack.size()]; in ImportTemplateArgument()
2056 StructuralEquivalenceContext Ctx(Importer.getFromContext(), in IsStructuralMatch()
2057 Importer.getToContext(), in IsStructuralMatch()
2058 Importer.getNonEquivalentDecls()); in IsStructuralMatch()
2063 StructuralEquivalenceContext Ctx(Importer.getFromContext(), in IsStructuralMatch()
2064 Importer.getToContext(), in IsStructuralMatch()
2065 Importer.getNonEquivalentDecls()); in IsStructuralMatch()
2071 StructuralEquivalenceContext Ctx(Importer.getFromContext(), in IsStructuralMatch()
2072 Importer.getToContext(), in IsStructuralMatch()
2073 Importer.getNonEquivalentDecls()); in IsStructuralMatch()
2078 Importer.FromDiag(D->getLocation(), diag::err_unsupported_ast_node) in VisitDecl()
2085 Importer.getToContext().getTranslationUnitDecl(); in VisitTranslationUnitDecl()
2087 Importer.Imported(D, ToD); in VisitTranslationUnitDecl()
2127 Name = Importer.HandleNameConflict(Name, DC, Decl::IDNS_Namespace, in VisitNamespaceDecl()
2136 ToNamespace = NamespaceDecl::Create(Importer.getToContext(), DC, in VisitNamespaceDecl()
2138 Importer.Import(D->getLocStart()), in VisitNamespaceDecl()
2153 Importer.Imported(D, ToNamespace); in VisitNamespaceDecl()
2181 if (Importer.IsStructurallyEquivalent(D->getUnderlyingType(), in VisitTypedefNameDecl()
2183 return Importer.Imported(D, FoundTypedef); in VisitTypedefNameDecl()
2190 Name = Importer.HandleNameConflict(Name, DC, IDNS, in VisitTypedefNameDecl()
2199 QualType T = Importer.Import(D->getUnderlyingType()); in VisitTypedefNameDecl()
2204 TypeSourceInfo *TInfo = Importer.Import(D->getTypeSourceInfo()); in VisitTypedefNameDecl()
2205 SourceLocation StartL = Importer.Import(D->getLocStart()); in VisitTypedefNameDecl()
2208 ToTypedef = TypeAliasDecl::Create(Importer.getToContext(), DC, in VisitTypedefNameDecl()
2213 ToTypedef = TypedefDecl::Create(Importer.getToContext(), DC, in VisitTypedefNameDecl()
2220 Importer.Imported(D, ToTypedef); in VisitTypedefNameDecl()
2246 SearchName = Importer.Import(D->getTypedefNameForAnonDecl()->getDeclName()); in VisitEnumDecl()
2248 } else if (Importer.getToContext().getLangOpts().CPlusPlus) in VisitEnumDecl()
2268 return Importer.Imported(D, FoundEnum); in VisitEnumDecl()
2275 Name = Importer.HandleNameConflict(Name, DC, IDNS, in VisitEnumDecl()
2282 EnumDecl *D2 = EnumDecl::Create(Importer.getToContext(), DC, in VisitEnumDecl()
2283 Importer.Import(D->getLocStart()), in VisitEnumDecl()
2288 D2->setQualifierInfo(Importer.Import(D->getQualifierLoc())); in VisitEnumDecl()
2291 Importer.Imported(D, D2); in VisitEnumDecl()
2295 QualType ToIntegerType = Importer.Import(D->getIntegerType()); in VisitEnumDecl()
2313 Decl *ImportedDef = Importer.Import(Definition); in VisitRecordDecl()
2317 return Importer.Imported(D, ImportedDef); in VisitRecordDecl()
2331 SearchName = Importer.Import(D->getTypedefNameForAnonDecl()->getDeclName()); in VisitRecordDecl()
2333 } else if (Importer.getToContext().getLangOpts().CPlusPlus) in VisitRecordDecl()
2359 return Importer.Imported(D, FoundDef); in VisitRecordDecl()
2373 Name = Importer.HandleNameConflict(Name, DC, IDNS, in VisitRecordDecl()
2381 SourceLocation StartLoc = Importer.Import(D->getLocStart()); in VisitRecordDecl()
2384 CXXRecordDecl *D2CXX = CXXRecordDecl::Create(Importer.getToContext(), in VisitRecordDecl()
2391 D2 = RecordDecl::Create(Importer.getToContext(), D->getTagKind(), in VisitRecordDecl()
2395 D2->setQualifierInfo(Importer.Import(D->getQualifierLoc())); in VisitRecordDecl()
2400 Importer.Imported(D, D2); in VisitRecordDecl()
2416 QualType T = Importer.Import(D->getType()); in VisitEnumConstantDecl()
2435 Name = Importer.HandleNameConflict(Name, DC, IDNS, in VisitEnumConstantDecl()
2443 Expr *Init = Importer.Import(D->getInitExpr()); in VisitEnumConstantDecl()
2448 = EnumConstantDecl::Create(Importer.getToContext(), cast<EnumDecl>(DC), Loc, in VisitEnumConstantDecl()
2453 Importer.Imported(D, ToEnumerator); in VisitEnumConstantDecl()
2480 if (Importer.IsStructurallyEquivalent(D->getType(), in VisitFunctionDecl()
2483 return Importer.Imported(D, FoundFunction); in VisitFunctionDecl()
2490 if (Importer.getToContext().getLangOpts().CPlusPlus) in VisitFunctionDecl()
2494 Importer.ToDiag(Loc, diag::err_odr_function_type_inconsistent) in VisitFunctionDecl()
2496 Importer.ToDiag(FoundFunction->getLocation(), in VisitFunctionDecl()
2506 Name = Importer.HandleNameConflict(Name, DC, IDNS, in VisitFunctionDecl()
2519 QualType T = Importer.Import(D->getType()); in VisitFunctionDecl()
2527 ParmVarDecl *ToP = cast_or_null<ParmVarDecl>(Importer.Import(*P)); in VisitFunctionDecl()
2535 TypeSourceInfo *TInfo = Importer.Import(D->getTypeSourceInfo()); in VisitFunctionDecl()
2538 ToFunction = CXXConstructorDecl::Create(Importer.getToContext(), in VisitFunctionDecl()
2547 ToFunction = CXXDestructorDecl::Create(Importer.getToContext(), in VisitFunctionDecl()
2555 ToFunction = CXXConversionDecl::Create(Importer.getToContext(), in VisitFunctionDecl()
2562 Importer.Import(D->getLocEnd())); in VisitFunctionDecl()
2564 ToFunction = CXXMethodDecl::Create(Importer.getToContext(), in VisitFunctionDecl()
2572 Importer.Import(D->getLocEnd())); in VisitFunctionDecl()
2574 ToFunction = FunctionDecl::Create(Importer.getToContext(), DC, in VisitFunctionDecl()
2584 ToFunction->setQualifierInfo(Importer.Import(D->getQualifierLoc())); in VisitFunctionDecl()
2590 Importer.Imported(D, ToFunction); in VisitFunctionDecl()
2636 if (Importer.IsStructurallyEquivalent(D->getType(), in VisitFieldDecl()
2638 Importer.Imported(D, FoundField); in VisitFieldDecl()
2642 Importer.ToDiag(Loc, diag::err_odr_field_type_inconsistent) in VisitFieldDecl()
2644 Importer.ToDiag(FoundField->getLocation(), diag::note_odr_value_here) in VisitFieldDecl()
2651 QualType T = Importer.Import(D->getType()); in VisitFieldDecl()
2655 TypeSourceInfo *TInfo = Importer.Import(D->getTypeSourceInfo()); in VisitFieldDecl()
2656 Expr *BitWidth = Importer.Import(D->getBitWidth()); in VisitFieldDecl()
2660 FieldDecl *ToField = FieldDecl::Create(Importer.getToContext(), DC, in VisitFieldDecl()
2661 Importer.Import(D->getInnerLocStart()), in VisitFieldDecl()
2669 Importer.Imported(D, ToField); in VisitFieldDecl()
2688 if (Importer.IsStructurallyEquivalent(D->getType(), in VisitIndirectFieldDecl()
2690 Importer.Imported(D, FoundField); in VisitIndirectFieldDecl()
2694 Importer.ToDiag(Loc, diag::err_odr_field_type_inconsistent) in VisitIndirectFieldDecl()
2696 Importer.ToDiag(FoundField->getLocation(), diag::note_odr_value_here) in VisitIndirectFieldDecl()
2703 QualType T = Importer.Import(D->getType()); in VisitIndirectFieldDecl()
2708 new (Importer.getToContext())NamedDecl*[D->getChainingSize()]; in VisitIndirectFieldDecl()
2713 Decl* D = Importer.Import(*PI); in VisitIndirectFieldDecl()
2720 Importer.getToContext(), DC, in VisitIndirectFieldDecl()
2725 Importer.Imported(D, ToIndirectField); in VisitIndirectFieldDecl()
2743 if (Importer.IsStructurallyEquivalent(D->getType(), in VisitObjCIvarDecl()
2745 Importer.Imported(D, FoundIvar); in VisitObjCIvarDecl()
2749 Importer.ToDiag(Loc, diag::err_odr_ivar_type_inconsistent) in VisitObjCIvarDecl()
2751 Importer.ToDiag(FoundIvar->getLocation(), diag::note_odr_value_here) in VisitObjCIvarDecl()
2758 QualType T = Importer.Import(D->getType()); in VisitObjCIvarDecl()
2762 TypeSourceInfo *TInfo = Importer.Import(D->getTypeSourceInfo()); in VisitObjCIvarDecl()
2763 Expr *BitWidth = Importer.Import(D->getBitWidth()); in VisitObjCIvarDecl()
2767 ObjCIvarDecl *ToIvar = ObjCIvarDecl::Create(Importer.getToContext(), in VisitObjCIvarDecl()
2769 Importer.Import(D->getInnerLocStart()), in VisitObjCIvarDecl()
2774 Importer.Imported(D, ToIvar); in VisitObjCIvarDecl()
2804 if (Importer.IsStructurallyEquivalent(D->getType(), in VisitVarDecl()
2811 = Importer.getToContext().getAsArrayType(FoundVar->getType()); in VisitVarDecl()
2813 = Importer.getToContext().getAsArrayType(D->getType()); in VisitVarDecl()
2818 QualType T = Importer.Import(D->getType()); in VisitVarDecl()
2832 Importer.ToDiag(Loc, diag::err_odr_variable_type_inconsistent) in VisitVarDecl()
2834 Importer.ToDiag(FoundVar->getLocation(), diag::note_odr_value_here) in VisitVarDecl()
2845 Importer.Imported(D, MergeWithVar); in VisitVarDecl()
2849 Importer.ToDiag(ExistingDef->getLocation(), in VisitVarDecl()
2852 Importer.FromDiag(DDef->getLocation(), diag::note_odr_defined_here); in VisitVarDecl()
2854 Expr *Init = Importer.Import(DDef->getInit()); in VisitVarDecl()
2868 Name = Importer.HandleNameConflict(Name, DC, IDNS, in VisitVarDecl()
2877 QualType T = Importer.Import(D->getType()); in VisitVarDecl()
2882 TypeSourceInfo *TInfo = Importer.Import(D->getTypeSourceInfo()); in VisitVarDecl()
2883 VarDecl *ToVar = VarDecl::Create(Importer.getToContext(), DC, in VisitVarDecl()
2884 Importer.Import(D->getInnerLocStart()), in VisitVarDecl()
2889 ToVar->setQualifierInfo(Importer.Import(D->getQualifierLoc())); in VisitVarDecl()
2892 Importer.Imported(D, ToVar); in VisitVarDecl()
2899 ToVar->setInit(Importer.Import(const_cast<Expr *>(D->getAnyInitializer()))); in VisitVarDecl()
2909 DeclContext *DC = Importer.getToContext().getTranslationUnitDecl(); in VisitImplicitParamDecl()
2912 DeclarationName Name = Importer.Import(D->getDeclName()); in VisitImplicitParamDecl()
2917 SourceLocation Loc = Importer.Import(D->getLocation()); in VisitImplicitParamDecl()
2920 QualType T = Importer.Import(D->getType()); in VisitImplicitParamDecl()
2926 = ImplicitParamDecl::Create(Importer.getToContext(), DC, in VisitImplicitParamDecl()
2929 return Importer.Imported(D, ToParm); in VisitImplicitParamDecl()
2935 DeclContext *DC = Importer.getToContext().getTranslationUnitDecl(); in VisitParmVarDecl()
2938 DeclarationName Name = Importer.Import(D->getDeclName()); in VisitParmVarDecl()
2943 SourceLocation Loc = Importer.Import(D->getLocation()); in VisitParmVarDecl()
2946 QualType T = Importer.Import(D->getType()); in VisitParmVarDecl()
2951 TypeSourceInfo *TInfo = Importer.Import(D->getTypeSourceInfo()); in VisitParmVarDecl()
2952 ParmVarDecl *ToParm = ParmVarDecl::Create(Importer.getToContext(), DC, in VisitParmVarDecl()
2953 Importer.Import(D->getInnerLocStart()), in VisitParmVarDecl()
2959 return Importer.Imported(D, ToParm); in VisitParmVarDecl()
2978 if (!Importer.IsStructurallyEquivalent(D->getResultType(), in VisitObjCMethodDecl()
2980 Importer.ToDiag(Loc, diag::err_odr_objc_method_result_type_inconsistent) in VisitObjCMethodDecl()
2983 Importer.ToDiag(FoundMethod->getLocation(), in VisitObjCMethodDecl()
2991 Importer.ToDiag(Loc, diag::err_odr_objc_method_num_params_inconsistent) in VisitObjCMethodDecl()
2994 Importer.ToDiag(FoundMethod->getLocation(), in VisitObjCMethodDecl()
3004 if (!Importer.IsStructurallyEquivalent((*P)->getType(), in VisitObjCMethodDecl()
3006 Importer.FromDiag((*P)->getLocation(), in VisitObjCMethodDecl()
3010 Importer.ToDiag((*FoundP)->getLocation(), diag::note_odr_value_here) in VisitObjCMethodDecl()
3019 Importer.ToDiag(Loc, diag::err_odr_objc_method_variadic_inconsistent) in VisitObjCMethodDecl()
3021 Importer.ToDiag(FoundMethod->getLocation(), in VisitObjCMethodDecl()
3028 return Importer.Imported(D, FoundMethod); in VisitObjCMethodDecl()
3033 QualType ResultTy = Importer.Import(D->getResultType()); in VisitObjCMethodDecl()
3037 TypeSourceInfo *ResultTInfo = Importer.Import(D->getResultTypeSourceInfo()); in VisitObjCMethodDecl()
3040 = ObjCMethodDecl::Create(Importer.getToContext(), in VisitObjCMethodDecl()
3042 Importer.Import(D->getLocEnd()), in VisitObjCMethodDecl()
3062 ParmVarDecl *ToP = cast_or_null<ParmVarDecl>(Importer.Import(*FromP)); in VisitObjCMethodDecl()
3076 ToMethod->setMethodParams(Importer.getToContext(), ToParams, SelLocs); in VisitObjCMethodDecl()
3079 Importer.Imported(D, ToMethod); in VisitObjCMethodDecl()
3093 = cast_or_null<ObjCInterfaceDecl>(Importer.Import(D->getClassInterface())); in VisitObjCCategoryDecl()
3102 ToCategory = ObjCCategoryDecl::Create(Importer.getToContext(), DC, in VisitObjCCategoryDecl()
3103 Importer.Import(D->getAtStartLoc()), in VisitObjCCategoryDecl()
3105 Importer.Import(D->getCategoryNameLoc()), in VisitObjCCategoryDecl()
3108 Importer.Import(D->getIvarLBraceLoc()), in VisitObjCCategoryDecl()
3109 Importer.Import(D->getIvarRBraceLoc())); in VisitObjCCategoryDecl()
3112 Importer.Imported(D, ToCategory); in VisitObjCCategoryDecl()
3124 = cast_or_null<ObjCProtocolDecl>(Importer.Import(*FromProto)); in VisitObjCCategoryDecl()
3128 ProtocolLocs.push_back(Importer.Import(*FromProtoLoc)); in VisitObjCCategoryDecl()
3133 ProtocolLocs.data(), Importer.getToContext()); in VisitObjCCategoryDecl()
3136 Importer.Imported(D, ToCategory); in VisitObjCCategoryDecl()
3146 Importer.Import(D->getImplementation())); in VisitObjCCategoryDecl()
3178 = cast_or_null<ObjCProtocolDecl>(Importer.Import(*FromProto)); in ImportDefinition()
3182 ProtocolLocs.push_back(Importer.Import(*FromProtoLoc)); in ImportDefinition()
3187 ProtocolLocs.data(), Importer.getToContext()); in ImportDefinition()
3202 Decl *ImportedDef = Importer.Import(Definition); in VisitObjCProtocolDecl()
3206 return Importer.Imported(D, ImportedDef); in VisitObjCProtocolDecl()
3229 ToProto = ObjCProtocolDecl::Create(Importer.getToContext(), DC, in VisitObjCProtocolDecl()
3231 Importer.Import(D->getAtStartLoc()), in VisitObjCProtocolDecl()
3237 Importer.Imported(D, ToProto); in VisitObjCProtocolDecl()
3252 FromSuper = cast_or_null<ObjCInterfaceDecl>(Importer.Import(FromSuper)); in ImportDefinition()
3260 Importer.ToDiag(To->getLocation(), in ImportDefinition()
3264 Importer.ToDiag(To->getSuperClassLoc(), diag::note_odr_objc_superclass) in ImportDefinition()
3267 Importer.ToDiag(To->getLocation(), in ImportDefinition()
3270 Importer.FromDiag(From->getSuperClassLoc(), in ImportDefinition()
3274 Importer.FromDiag(From->getLocation(), in ImportDefinition()
3289 Importer.Import(From->getSuperClass())); in ImportDefinition()
3294 To->setSuperClassLoc(Importer.Import(From->getSuperClassLoc())); in ImportDefinition()
3308 = cast_or_null<ObjCProtocolDecl>(Importer.Import(*FromProto)); in ImportDefinition()
3312 ProtocolLocs.push_back(Importer.Import(*FromProtoLoc)); in ImportDefinition()
3317 ProtocolLocs.data(), Importer.getToContext()); in ImportDefinition()
3323 Importer.Import(FromCat); in ImportDefinition()
3328 Importer.Import(From->getImplementation())); in ImportDefinition()
3348 Decl *ImportedDef = Importer.Import(Definition); in VisitObjCInterfaceDecl()
3352 return Importer.Imported(D, ImportedDef); in VisitObjCInterfaceDecl()
3377 ToIface = ObjCInterfaceDecl::Create(Importer.getToContext(), DC, in VisitObjCInterfaceDecl()
3378 Importer.Import(D->getAtStartLoc()), in VisitObjCInterfaceDecl()
3385 Importer.Imported(D, ToIface); in VisitObjCInterfaceDecl()
3395 Importer.Import(D->getCategoryDecl())); in VisitObjCCategoryImplDecl()
3401 DeclContext *DC = Importer.ImportContext(D->getDeclContext()); in VisitObjCCategoryImplDecl()
3405 SourceLocation CategoryNameLoc = Importer.Import(D->getCategoryNameLoc()); in VisitObjCCategoryImplDecl()
3406 ToImpl = ObjCCategoryImplDecl::Create(Importer.getToContext(), DC, in VisitObjCCategoryImplDecl()
3407 Importer.Import(D->getIdentifier()), in VisitObjCCategoryImplDecl()
3409 Importer.Import(D->getLocation()), in VisitObjCCategoryImplDecl()
3410 Importer.Import(D->getAtStartLoc()), in VisitObjCCategoryImplDecl()
3415 LexicalDC = Importer.ImportContext(D->getLexicalDeclContext()); in VisitObjCCategoryImplDecl()
3426 Importer.Imported(D, ToImpl); in VisitObjCCategoryImplDecl()
3434 Importer.Import(D->getClassInterface())); in VisitObjCImplementationDecl()
3442 Importer.Import(D->getSuperClass())); in VisitObjCImplementationDecl()
3451 Impl = ObjCImplementationDecl::Create(Importer.getToContext(), in VisitObjCImplementationDecl()
3452 Importer.ImportContext(D->getDeclContext()), in VisitObjCImplementationDecl()
3454 Importer.Import(D->getLocation()), in VisitObjCImplementationDecl()
3455 Importer.Import(D->getAtStartLoc()), in VisitObjCImplementationDecl()
3456 Importer.Import(D->getIvarLBraceLoc()), in VisitObjCImplementationDecl()
3457 Importer.Import(D->getIvarRBraceLoc())); in VisitObjCImplementationDecl()
3461 = Importer.ImportContext(D->getLexicalDeclContext()); in VisitObjCImplementationDecl()
3469 Importer.Imported(D, Iface->getImplementation()); in VisitObjCImplementationDecl()
3471 Importer.Imported(D, Iface->getImplementation()); in VisitObjCImplementationDecl()
3478 Importer.ToDiag(Impl->getLocation(), in VisitObjCImplementationDecl()
3484 Importer.ToDiag(Impl->getLocation(), in VisitObjCImplementationDecl()
3488 Importer.ToDiag(Impl->getLocation(), in VisitObjCImplementationDecl()
3491 Importer.FromDiag(D->getLocation(), in VisitObjCImplementationDecl()
3495 Importer.FromDiag(D->getLocation(), in VisitObjCImplementationDecl()
3522 if (!Importer.IsStructurallyEquivalent(D->getType(), in VisitObjCPropertyDecl()
3524 Importer.ToDiag(Loc, diag::err_odr_objc_property_type_inconsistent) in VisitObjCPropertyDecl()
3526 Importer.ToDiag(FoundProp->getLocation(), diag::note_odr_value_here) in VisitObjCPropertyDecl()
3534 Importer.Imported(D, FoundProp); in VisitObjCPropertyDecl()
3540 TypeSourceInfo *T = Importer.Import(D->getTypeSourceInfo()); in VisitObjCPropertyDecl()
3546 = ObjCPropertyDecl::Create(Importer.getToContext(), DC, Loc, in VisitObjCPropertyDecl()
3548 Importer.Import(D->getAtLoc()), in VisitObjCPropertyDecl()
3549 Importer.Import(D->getLParenLoc()), in VisitObjCPropertyDecl()
3552 Importer.Imported(D, ToProperty); in VisitObjCPropertyDecl()
3559 ToProperty->setGetterName(Importer.Import(D->getGetterName())); in VisitObjCPropertyDecl()
3560 ToProperty->setSetterName(Importer.Import(D->getSetterName())); in VisitObjCPropertyDecl()
3562 cast_or_null<ObjCMethodDecl>(Importer.Import(D->getGetterMethodDecl()))); in VisitObjCPropertyDecl()
3564 cast_or_null<ObjCMethodDecl>(Importer.Import(D->getSetterMethodDecl()))); in VisitObjCPropertyDecl()
3566 cast_or_null<ObjCIvarDecl>(Importer.Import(D->getPropertyIvarDecl()))); in VisitObjCPropertyDecl()
3572 Importer.Import(D->getPropertyDecl())); in VisitObjCPropertyImplDecl()
3576 DeclContext *DC = Importer.ImportContext(D->getDeclContext()); in VisitObjCPropertyImplDecl()
3583 LexicalDC = Importer.ImportContext(D->getLexicalDeclContext()); in VisitObjCPropertyImplDecl()
3596 Importer.Import(D->getPropertyIvarDecl())); in VisitObjCPropertyImplDecl()
3604 ToImpl = ObjCPropertyImplDecl::Create(Importer.getToContext(), DC, in VisitObjCPropertyImplDecl()
3605 Importer.Import(D->getLocStart()), in VisitObjCPropertyImplDecl()
3606 Importer.Import(D->getLocation()), in VisitObjCPropertyImplDecl()
3610 Importer.Import(D->getPropertyIvarDeclLoc())); in VisitObjCPropertyImplDecl()
3612 Importer.Imported(D, ToImpl); in VisitObjCPropertyImplDecl()
3618 Importer.ToDiag(ToImpl->getLocation(), in VisitObjCPropertyImplDecl()
3623 Importer.FromDiag(D->getLocation(), in VisitObjCPropertyImplDecl()
3633 Importer.ToDiag(ToImpl->getPropertyIvarDeclLoc(), in VisitObjCPropertyImplDecl()
3638 Importer.FromDiag(D->getPropertyIvarDeclLoc(), in VisitObjCPropertyImplDecl()
3645 Importer.Imported(D, ToImpl); in VisitObjCPropertyImplDecl()
3657 return TemplateTypeParmDecl::Create(Importer.getToContext(), in VisitTemplateTypeParmDecl()
3658 Importer.getToContext().getTranslationUnitDecl(), in VisitTemplateTypeParmDecl()
3659 Importer.Import(D->getLocStart()), in VisitTemplateTypeParmDecl()
3660 Importer.Import(D->getLocation()), in VisitTemplateTypeParmDecl()
3663 Importer.Import(D->getIdentifier()), in VisitTemplateTypeParmDecl()
3671 DeclarationName Name = Importer.Import(D->getDeclName()); in VisitNonTypeTemplateParmDecl()
3676 SourceLocation Loc = Importer.Import(D->getLocation()); in VisitNonTypeTemplateParmDecl()
3679 QualType T = Importer.Import(D->getType()); in VisitNonTypeTemplateParmDecl()
3684 TypeSourceInfo *TInfo = Importer.Import(D->getTypeSourceInfo()); in VisitNonTypeTemplateParmDecl()
3690 return NonTypeTemplateParmDecl::Create(Importer.getToContext(), in VisitNonTypeTemplateParmDecl()
3691 Importer.getToContext().getTranslationUnitDecl(), in VisitNonTypeTemplateParmDecl()
3692 Importer.Import(D->getInnerLocStart()), in VisitNonTypeTemplateParmDecl()
3701 DeclarationName Name = Importer.Import(D->getDeclName()); in VisitTemplateTemplateParmDecl()
3706 SourceLocation Loc = Importer.Import(D->getLocation()); in VisitTemplateTemplateParmDecl()
3716 return TemplateTemplateParmDecl::Create(Importer.getToContext(), in VisitTemplateTemplateParmDecl()
3717 Importer.getToContext().getTranslationUnitDecl(), in VisitTemplateTemplateParmDecl()
3732 = Importer.Import(Definition->getDescribedClassTemplate()); in VisitClassTemplateDecl()
3736 return Importer.Imported(D, ImportedDef); in VisitClassTemplateDecl()
3762 Importer.Imported(D->getTemplatedDecl(), in VisitClassTemplateDecl()
3764 return Importer.Imported(D, FoundTemplate); in VisitClassTemplateDecl()
3772 Name = Importer.HandleNameConflict(Name, DC, Decl::IDNS_Ordinary, in VisitClassTemplateDecl()
3784 SourceLocation StartLoc = Importer.Import(DTemplated->getLocStart()); in VisitClassTemplateDecl()
3785 SourceLocation IdLoc = Importer.Import(DTemplated->getLocation()); in VisitClassTemplateDecl()
3786 CXXRecordDecl *D2Templated = CXXRecordDecl::Create(Importer.getToContext(), in VisitClassTemplateDecl()
3791 D2Templated->setQualifierInfo(Importer.Import(DTemplated->getQualifierLoc())); in VisitClassTemplateDecl()
3800 ClassTemplateDecl *D2 = ClassTemplateDecl::Create(Importer.getToContext(), DC, in VisitClassTemplateDecl()
3811 Importer.Imported(D, D2); in VisitClassTemplateDecl()
3812 Importer.Imported(DTemplated, D2Templated); in VisitClassTemplateDecl()
3829 Decl *ImportedDef = Importer.Import(Definition); in VisitClassTemplateSpecializationDecl()
3833 return Importer.Imported(D, ImportedDef); in VisitClassTemplateSpecializationDecl()
3837 = cast_or_null<ClassTemplateDecl>(Importer.Import( in VisitClassTemplateSpecializationDecl()
3849 LexicalDC = Importer.ImportContext(D->getLexicalDeclContext()); in VisitClassTemplateSpecializationDecl()
3855 SourceLocation StartLoc = Importer.Import(D->getLocStart()); in VisitClassTemplateSpecializationDecl()
3856 SourceLocation IdLoc = Importer.Import(D->getLocation()); in VisitClassTemplateSpecializationDecl()
3881 return Importer.Imported(D, FoundDef); in VisitClassTemplateSpecializationDecl()
3886 D2 = ClassTemplateSpecializationDecl::Create(Importer.getToContext(), in VisitClassTemplateSpecializationDecl()
3899 D2->setQualifierInfo(Importer.Import(D->getQualifierLoc())); in VisitClassTemplateSpecializationDecl()
3905 Importer.Imported(D, D2); in VisitClassTemplateSpecializationDecl()
3918 Importer.FromDiag(S->getLocStart(), diag::err_unsupported_ast_node) in VisitStmt()
3927 Importer.FromDiag(E->getLocStart(), diag::err_unsupported_ast_node) in VisitExpr()
3933 ValueDecl *ToD = cast_or_null<ValueDecl>(Importer.Import(E->getDecl())); in VisitDeclRefExpr()
3939 FoundD = cast_or_null<NamedDecl>(Importer.Import(E->getFoundDecl())); in VisitDeclRefExpr()
3944 QualType T = Importer.Import(E->getType()); in VisitDeclRefExpr()
3948 DeclRefExpr *DRE = DeclRefExpr::Create(Importer.getToContext(), in VisitDeclRefExpr()
3949 Importer.Import(E->getQualifierLoc()), in VisitDeclRefExpr()
3950 Importer.Import(E->getTemplateKeywordLoc()), in VisitDeclRefExpr()
3953 Importer.Import(E->getLocation()), in VisitDeclRefExpr()
3963 QualType T = Importer.Import(E->getType()); in VisitIntegerLiteral()
3967 return IntegerLiteral::Create(Importer.getToContext(), in VisitIntegerLiteral()
3969 Importer.Import(E->getLocation())); in VisitIntegerLiteral()
3973 QualType T = Importer.Import(E->getType()); in VisitCharacterLiteral()
3977 return new (Importer.getToContext()) CharacterLiteral(E->getValue(), in VisitCharacterLiteral()
3979 Importer.Import(E->getLocation())); in VisitCharacterLiteral()
3983 Expr *SubExpr = Importer.Import(E->getSubExpr()); in VisitParenExpr()
3987 return new (Importer.getToContext()) in VisitParenExpr()
3988 ParenExpr(Importer.Import(E->getLParen()), in VisitParenExpr()
3989 Importer.Import(E->getRParen()), in VisitParenExpr()
3994 QualType T = Importer.Import(E->getType()); in VisitUnaryOperator()
3998 Expr *SubExpr = Importer.Import(E->getSubExpr()); in VisitUnaryOperator()
4002 return new (Importer.getToContext()) UnaryOperator(SubExpr, E->getOpcode(), in VisitUnaryOperator()
4005 … Importer.Import(E->getOperatorLoc())); in VisitUnaryOperator()
4010 QualType ResultType = Importer.Import(E->getType()); in VisitUnaryExprOrTypeTraitExpr()
4013 TypeSourceInfo *TInfo = Importer.Import(E->getArgumentTypeInfo()); in VisitUnaryExprOrTypeTraitExpr()
4017 return new (Importer.getToContext()) UnaryExprOrTypeTraitExpr(E->getKind(), in VisitUnaryExprOrTypeTraitExpr()
4019 Importer.Import(E->getOperatorLoc()), in VisitUnaryExprOrTypeTraitExpr()
4020 Importer.Import(E->getRParenLoc())); in VisitUnaryExprOrTypeTraitExpr()
4023 Expr *SubExpr = Importer.Import(E->getArgumentExpr()); in VisitUnaryExprOrTypeTraitExpr()
4027 return new (Importer.getToContext()) UnaryExprOrTypeTraitExpr(E->getKind(), in VisitUnaryExprOrTypeTraitExpr()
4029 Importer.Import(E->getOperatorLoc()), in VisitUnaryExprOrTypeTraitExpr()
4030 Importer.Import(E->getRParenLoc())); in VisitUnaryExprOrTypeTraitExpr()
4034 QualType T = Importer.Import(E->getType()); in VisitBinaryOperator()
4038 Expr *LHS = Importer.Import(E->getLHS()); in VisitBinaryOperator()
4042 Expr *RHS = Importer.Import(E->getRHS()); in VisitBinaryOperator()
4046 return new (Importer.getToContext()) BinaryOperator(LHS, RHS, E->getOpcode(), in VisitBinaryOperator()
4049 Importer.Import(E->getOperatorLoc())); in VisitBinaryOperator()
4053 QualType T = Importer.Import(E->getType()); in VisitCompoundAssignOperator()
4057 QualType CompLHSType = Importer.Import(E->getComputationLHSType()); in VisitCompoundAssignOperator()
4061 QualType CompResultType = Importer.Import(E->getComputationResultType()); in VisitCompoundAssignOperator()
4065 Expr *LHS = Importer.Import(E->getLHS()); in VisitCompoundAssignOperator()
4069 Expr *RHS = Importer.Import(E->getRHS()); in VisitCompoundAssignOperator()
4073 return new (Importer.getToContext()) in VisitCompoundAssignOperator()
4078 Importer.Import(E->getOperatorLoc())); in VisitCompoundAssignOperator()
4089 QualType T = Importer.Import(E->getType()); in VisitImplicitCastExpr()
4093 Expr *SubExpr = Importer.Import(E->getSubExpr()); in VisitImplicitCastExpr()
4101 return ImplicitCastExpr::Create(Importer.getToContext(), T, E->getCastKind(), in VisitImplicitCastExpr()
4106 QualType T = Importer.Import(E->getType()); in VisitCStyleCastExpr()
4110 Expr *SubExpr = Importer.Import(E->getSubExpr()); in VisitCStyleCastExpr()
4114 TypeSourceInfo *TInfo = Importer.Import(E->getTypeInfoAsWritten()); in VisitCStyleCastExpr()
4122 return CStyleCastExpr::Create(Importer.getToContext(), T, in VisitCStyleCastExpr()
4125 Importer.Import(E->getLParenLoc()), in VisitCStyleCastExpr()
4126 Importer.Import(E->getRParenLoc())); in VisitCStyleCastExpr()
4155 ASTNodeImporter Importer(*this); in Import() local
4156 QualType ToT = Importer.Visit(fromTy); in Import()
4184 ASTNodeImporter Importer(*this); in Import() local
4190 Importer.ImportDefinitionIfNeeded(FromD, ToD); in Import()
4195 Decl *ToD = Importer.Visit(FromD); in Import()
4299 ASTNodeImporter Importer(*this); in Import() local
4300 Stmt *ToS = Importer.Visit(FromS); in Import()
4436 ASTNodeImporter Importer(*this); in Import() local
4438 = Importer.ImportTemplateArgument(SubstPack->getArgumentPack()); in Import()
4515 ASTNodeImporter Importer(*this); in ImportDefinition() local
4519 Importer.ImportDefinition(cast<RecordDecl>(FromDC), ToRecord, in ImportDefinition()
4527 Importer.ImportDefinition(cast<EnumDecl>(FromDC), ToEnum, in ImportDefinition()
4535 Importer.ImportDefinition(cast<ObjCInterfaceDecl>(FromDC), ToIFace, in ImportDefinition()
4543 Importer.ImportDefinition(cast<ObjCProtocolDecl>(FromDC), ToProto, in ImportDefinition()
4549 Importer.ImportDeclContext(FromDC, true); in ImportDefinition()