summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTImporter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-20 02:24:11 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-20 02:24:11 +0000
commitd2fa766ad03ebb5e5170c7593ade7c322fe174e8 (patch)
tree8b9fb3ac9db5e439bc1d64886e34277b46140de2 /clang/lib/AST/ASTImporter.cpp
parent17a06b7efab559f0ae8df678524d6e3c3dfd3d52 (diff)
downloadbcm5719-llvm-d2fa766ad03ebb5e5170c7593ade7c322fe174e8.tar.gz
bcm5719-llvm-d2fa766ad03ebb5e5170c7593ade7c322fe174e8.zip
Introduce a new type, PackExpansionType, to capture types that are
pack expansions, e.g. given template<typename... Types> struct tuple; template<typename... Types> struct tuple_of_refs { typedef tuple<Types&...> types; }; the type of the "types" typedef is a PackExpansionType whose pattern is Types&. This commit introduces support for creating pack expansions for template type arguments, as above, but not for any other kind of pack expansion, nor for any form of instantiation. llvm-svn: 122223
Diffstat (limited to 'clang/lib/AST/ASTImporter.cpp')
-rw-r--r--clang/lib/AST/ASTImporter.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp
index cc485c47d9f..7ff217e3345 100644
--- a/clang/lib/AST/ASTImporter.cpp
+++ b/clang/lib/AST/ASTImporter.cpp
@@ -707,7 +707,14 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
}
break;
}
-
+
+ case Type::PackExpansion:
+ if (!IsStructurallyEquivalent(Context,
+ cast<PackExpansionType>(T1)->getPattern(),
+ cast<PackExpansionType>(T2)->getPattern()))
+ return false;
+ break;
+
case Type::ObjCInterface: {
const ObjCInterfaceType *Iface1 = cast<ObjCInterfaceType>(T1);
const ObjCInterfaceType *Iface2 = cast<ObjCInterfaceType>(T2);
OpenPOWER on IntegriCloud