diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-11-29 16:04:58 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-11-29 16:04:58 +0000 |
| commit | a50ad137521ecc21a8202b72b86e3459970c1adf (patch) | |
| tree | 5d5d59fa9b7433b1b4ca520b6067aa4cf7351e19 | |
| parent | 1ff0bfa28fa2af61e39de20d9245e9c7fe8e22cd (diff) | |
| download | bcm5719-llvm-a50ad137521ecc21a8202b72b86e3459970c1adf.tar.gz bcm5719-llvm-a50ad137521ecc21a8202b72b86e3459970c1adf.zip | |
Teach the ASTImporter how to create CXXMethodDecls. Somehow, this case was missed previously
llvm-svn: 120289
| -rw-r--r-- | clang/lib/AST/ASTImporter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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<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(), |

