From: Sean Callanan Date: Thu, 11 Aug 2011 16:56:07 +0000 (+0000) Subject: Extended the AST importer to support ParenTypes. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0aeb2890389ec1872e49a18fb2022bfb9f96578d;p=clang Extended the AST importer to support ParenTypes. This is necessary to support importing certain function pointer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137311 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index 867db91ac5..9ea9a5789d 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -59,6 +59,7 @@ namespace { QualType VisitFunctionNoProtoType(const FunctionNoProtoType *T); QualType VisitFunctionProtoType(const FunctionProtoType *T); // FIXME: UnresolvedUsingType + QualType VisitParenType(const ParenType *T); QualType VisitTypedefType(const TypedefType *T); QualType VisitTypeOfExprType(const TypeOfExprType *T); // FIXME: DependentTypeOfExprType @@ -1550,6 +1551,14 @@ QualType ASTNodeImporter::VisitFunctionProtoType(const FunctionProtoType *T) { ArgTypes.size(), EPI); } +QualType ASTNodeImporter::VisitParenType(const ParenType *T) { + QualType ToInnerType = Importer.Import(T->getInnerType()); + if (ToInnerType.isNull()) + return QualType(); + + return Importer.getToContext().getParenType(ToInnerType); +} + QualType ASTNodeImporter::VisitTypedefType(const TypedefType *T) { TypedefNameDecl *ToDecl = dyn_cast_or_null(Importer.Import(T->getDecl()));