]> granicus.if.org Git - clang/commitdiff
Teach the ASTImporter how to create CXXMethodDecls. Somehow, this case was missed...
authorDouglas Gregor <dgregor@apple.com>
Mon, 29 Nov 2010 16:04:58 +0000 (16:04 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 29 Nov 2010 16:04:58 +0000 (16:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120289 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTImporter.cpp

index fcd9caa304208470fbc168bd6dca333a5bc88ee8..054e3a89d840c5768cb0b013ff14fac428e40594 100644 (file)
@@ -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(),