Report all methods in an Objective-C class that
have a certain name, not just the first.  This
is useful if a class method and an instance
method have the same name.

<rdar://problem/14872081>

llvm-svn: 190008
diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp
index 49513d7..316efdf 100644
--- a/lldb/source/Expression/ClangASTSource.cpp
+++ b/lldb/source/Expression/ClangASTSource.cpp
@@ -878,31 +878,34 @@
     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;
 }