summaryrefslogtreecommitdiffstats
path: root/source/Expression/ClangASTSource.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-11-06 16:48:53 +0000
committeremaste <emaste@FreeBSD.org>2013-11-06 16:48:53 +0000
commitc727fe695d28799acb499e9961f11ec07d4f9fe2 (patch)
tree56d79f94966870db1cecd65a7264510a25fd1cba /source/Expression/ClangASTSource.cpp
parent2e8c9206a971efee1b77ad2ae852265d6f4ecaa0 (diff)
downloadFreeBSD-src-c727fe695d28799acb499e9961f11ec07d4f9fe2.zip
FreeBSD-src-c727fe695d28799acb499e9961f11ec07d4f9fe2.tar.gz
Import lldb as of SVN r194122
Sponsored by: DARPA, AFRL
Diffstat (limited to 'source/Expression/ClangASTSource.cpp')
-rw-r--r--source/Expression/ClangASTSource.cpp47
1 files changed, 25 insertions, 22 deletions
diff --git a/source/Expression/ClangASTSource.cpp b/source/Expression/ClangASTSource.cpp
index 49513d7..316efdf9 100644
--- a/source/Expression/ClangASTSource.cpp
+++ b/source/Expression/ClangASTSource.cpp
@@ -878,31 +878,34 @@ FindObjCMethodDeclsWithOrigin (unsigned int current_id,
if (!result[0])
return false;
- ObjCMethodDecl *result_method = dyn_cast<ObjCMethodDecl>(result[0]);
-
- if (!result_method)
- return false;
-
- Decl *copied_decl = ast_importer->CopyDecl(ast_context, &result_method->getASTContext(), result_method);
-
- if (!copied_decl)
- return false;
-
- ObjCMethodDecl *copied_method_decl = dyn_cast<ObjCMethodDecl>(copied_decl);
-
- if (!copied_method_decl)
- return false;
-
- Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
-
- if (log)
+ for (NamedDecl *named_decl : result)
{
- ASTDumper dumper((Decl*)copied_method_decl);
- log->Printf(" CAS::FOMD[%d] found (%s) %s", current_id, log_info, dumper.GetCString());
+ ObjCMethodDecl *result_method = dyn_cast<ObjCMethodDecl>(named_decl);
+
+ if (!result_method)
+ return false;
+
+ Decl *copied_decl = ast_importer->CopyDecl(ast_context, &result_method->getASTContext(), result_method);
+
+ if (!copied_decl)
+ return false;
+
+ ObjCMethodDecl *copied_method_decl = dyn_cast<ObjCMethodDecl>(copied_decl);
+
+ if (!copied_method_decl)
+ return false;
+
+ Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
+
+ if (log)
+ {
+ ASTDumper dumper((Decl*)copied_method_decl);
+ log->Printf(" CAS::FOMD[%d] found (%s) %s", current_id, log_info, dumper.GetCString());
+ }
+
+ context.AddNamedDecl(copied_method_decl);
}
- context.AddNamedDecl(copied_method_decl);
-
return true;
}
OpenPOWER on IntegriCloud