From: Douglas Gregor <dgregor@apple.com>
Date: Mon, 29 Nov 2010 16:04:58 +0000 (+0000)
Subject: Teach the ASTImporter how to create CXXMethodDecls. Somehow, this case was missed... 
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0629cbe86b6d890076548778ed8597ee298adcba;p=clang

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
---

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<CXXMethodDecl>(D)) {
+    ToFunction = CXXMethodDecl::Create(Importer.getToContext(), 
+                                       cast<CXXRecordDecl>(DC),
+                                       NameInfo, T, TInfo,
+                                       Method->isStatic(),
+                                       Method->getStorageClassAsWritten(),
+                                       Method->isInlineSpecified());
   } else {
     ToFunction = FunctionDecl::Create(Importer.getToContext(), DC,
                                       NameInfo, T, TInfo, D->getStorageClass(),