diff options
author | Sean Callanan <scallanan@apple.com> | 2011-08-11 16:56:07 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2011-08-11 16:56:07 +0000 |
commit | 0aeb2890389ec1872e49a18fb2022bfb9f96578d (patch) | |
tree | d37643891c6df4edbe92a73715fb607131099cdb | |
parent | 89f920940de4b414616cabb310c37fa84ed2476a (diff) |
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
-rw-r--r-- | lib/AST/ASTImporter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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<TypedefNameDecl>(Importer.Import(T->getDecl())); |