From a50ad137521ecc21a8202b72b86e3459970c1adf Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 29 Nov 2010 16:04:58 +0000 Subject: Teach the ASTImporter how to create CXXMethodDecls. Somehow, this case was missed previously llvm-svn: 120289 --- clang/lib/AST/ASTImporter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/lib/AST/ASTImporter.cpp') diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp index fcd9caa3042..054e3a89d84 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/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(), -- cgit v1.2.3