From 0629cbe86b6d890076548778ed8597ee298adcba Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 29 Nov 2010 16:04:58 +0000 Subject: [PATCH] Teach the ASTImporter how to create CXXMethodDecls. Somehow, this case was missed previously git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120289 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ASTImporter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index fcd9caa304..054e3a89d8 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -1944,6 +1944,13 @@ Decl *ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) { NameInfo, T, TInfo, D->isInlineSpecified(), FromConversion->isExplicit()); + } else if (CXXMethodDecl *Method = dyn_cast(D)) { + ToFunction = CXXMethodDecl::Create(Importer.getToContext(), + cast(DC), + NameInfo, T, TInfo, + Method->isStatic(), + Method->getStorageClassAsWritten(), + Method->isInlineSpecified()); } else { ToFunction = FunctionDecl::Create(Importer.getToContext(), DC, NameInfo, T, TInfo, D->getStorageClass(), -- 2.40.0