summaryrefslogtreecommitdiff
path: root/clang/lib/AST/ASTImporterLookupTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ASTImporterLookupTable.cpp')
-rw-r--r--clang/lib/AST/ASTImporterLookupTable.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTImporterLookupTable.cpp b/clang/lib/AST/ASTImporterLookupTable.cpp
index 7390329d4ed8d..4d6fff8f34191 100644
--- a/clang/lib/AST/ASTImporterLookupTable.cpp
+++ b/clang/lib/AST/ASTImporterLookupTable.cpp
@@ -45,7 +45,11 @@ struct Builder : RecursiveASTVisitor<Builder> {
LT.add(RTy->getAsCXXRecordDecl());
else if (const auto *SpecTy = dyn_cast<TemplateSpecializationType>(Ty))
LT.add(SpecTy->getAsCXXRecordDecl());
- else if (isa<TypedefType>(Ty)) {
+ else if (const auto *SubstTy =
+ dyn_cast<SubstTemplateTypeParmType>(Ty)) {
+ if (SubstTy->getAsCXXRecordDecl())
+ LT.add(SubstTy->getAsCXXRecordDecl());
+ } else if (isa<TypedefType>(Ty)) {
// We do not put friend typedefs to the lookup table because
// ASTImporter does not organize typedefs into redecl chains.
} else {