diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h
index 058012c..d2f509d 100644
--- a/include/clang/Sema/CodeCompleteConsumer.h
+++ b/include/clang/Sema/CodeCompleteConsumer.h
@@ -273,6 +273,11 @@
     /// \brief Retrieve the function type of the entity, regardless of how the
     /// function is stored.
     const FunctionType *getFunctionType() const;
+    
+    /// \brief Create a new code-completion string that describes the function
+    /// signature of this overload candidate.
+    CodeCompletionString *CreateSignatureString(unsigned CurrentArg, 
+                                                Sema &S) const;    
   };
   
   /// \brief Deregisters and destroys this code-completion consumer.
diff --git a/lib/Sema/CodeCompleteConsumer.cpp b/lib/Sema/CodeCompleteConsumer.cpp
index f1b475a..a3d4d92 100644
--- a/lib/Sema/CodeCompleteConsumer.cpp
+++ b/lib/Sema/CodeCompleteConsumer.cpp
@@ -169,26 +169,10 @@
                                               OverloadCandidate *Candidates,
                                                      unsigned NumCandidates) {
   for (unsigned I = 0; I != NumCandidates; ++I) {
-    std::string ArgString;
-    QualType ArgType;
-    
-    if (FunctionDecl *Function = Candidates[I].getFunction()) {
-      if (CurrentArg < Function->getNumParams()) {
-        ArgString = Function->getParamDecl(CurrentArg)->getNameAsString();
-        ArgType = Function->getParamDecl(CurrentArg)->getOriginalType();
-      }
-    } else if (const FunctionProtoType *Proto 
-                 = dyn_cast<FunctionProtoType>(
-                                            Candidates[I].getFunctionType())) {
-      if (CurrentArg < Proto->getNumArgs())
-        ArgType = Proto->getArgType(CurrentArg);
-    }
-    
-    if (ArgType.isNull())
-      OS << "...\n";  // We have no prototype or we're matching an ellipsis.
-    else {
-      ArgType.getAsStringInternal(ArgString, SemaRef.Context.PrintingPolicy);
-      OS << ArgString << "\n";
+    if (CodeCompletionString *CCS
+          = Candidates[I].CreateSignatureString(CurrentArg, SemaRef)) {
+      OS << CCS->getAsString() << "\n";
+      delete CCS;
     }
   }
 
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp
index 754d505..f879dae 100644
--- a/lib/Sema/SemaCodeComplete.cpp
+++ b/lib/Sema/SemaCodeComplete.cpp
@@ -869,6 +869,68 @@
   return 0;
 }
 
+CodeCompletionString *
+CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(
+                                                          unsigned CurrentArg,
+                                                               Sema &S) const {
+  CodeCompletionString *Result = new CodeCompletionString;
+  FunctionDecl *FDecl = getFunction();
+  const FunctionProtoType *Proto 
+    = dyn_cast<FunctionProtoType>(getFunctionType());
+  if (!FDecl && !Proto) {
+    // Function without a prototype. Just give the return type and a 
+    // highlighted ellipsis.
+    const FunctionType *FT = getFunctionType();
+    Result->AddTextChunk(
+            FT->getResultType().getAsString(S.Context.PrintingPolicy).c_str());
+    Result->AddTextChunk("(");
+    Result->AddPlaceholderChunk("...");
+    Result->AddTextChunk("(");    
+    return Result;
+  }
+  
+  if (FDecl)
+    Result->AddTextChunk(FDecl->getNameAsString().c_str());    
+  else
+    Result->AddTextChunk(
+         Proto->getResultType().getAsString(S.Context.PrintingPolicy).c_str());
+  
+  Result->AddTextChunk("(");
+  unsigned NumParams = FDecl? FDecl->getNumParams() : Proto->getNumArgs();
+  for (unsigned I = 0; I != NumParams; ++I) {
+    if (I)
+      Result->AddTextChunk(", ");
+    
+    std::string ArgString;
+    QualType ArgType;
+    
+    if (FDecl) {
+      ArgString = FDecl->getParamDecl(I)->getNameAsString();
+      ArgType = FDecl->getParamDecl(I)->getOriginalType();
+    } else {
+      ArgType = Proto->getArgType(I);
+    }
+    
+    ArgType.getAsStringInternal(ArgString, S.Context.PrintingPolicy);
+    
+    if (I == CurrentArg)
+      Result->AddPlaceholderChunk(ArgString.c_str());
+    else
+      Result->AddTextChunk(ArgString.c_str());
+  }
+  
+  if (Proto && Proto->isVariadic()) {
+    Result->AddTextChunk(", ");
+    if (CurrentArg < NumParams)
+      Result->AddTextChunk("...");
+    else
+      Result->AddPlaceholderChunk("...");
+  }
+  Result->AddTextChunk(")");
+  
+  return Result;
+}
+
 namespace {
   struct SortCodeCompleteResult {
     typedef CodeCompleteConsumer::Result Result;
diff --git a/test/CodeCompletion/call.cpp b/test/CodeCompletion/call.cpp
index 9a6f578..448b8eb 100644
--- a/test/CodeCompletion/call.cpp
+++ b/test/CodeCompletion/call.cpp
@@ -18,11 +18,11 @@
 void test() {
   f(Y(), 0, 0);
   // RUN: clang-cc -fsyntax-only -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CC1 %s &&
-  // CHECK-CC1: int ZZ
-  // CHECK-NEXT-CC1: int j
-  // CHECK-NEXT-CC1: float y
+  // CHECK-CC1: f(struct N::Y y, <#int ZZ#>)
+  // CHECK-NEXT-CC1: f(int i, <#int j#>, int k)
+  // CHECK-NEXT-CC1: f(float x, <#float y#>)
   // RUN: clang-cc -fsyntax-only -code-completion-at=%s:19:13 %s -o - | FileCheck -check-prefix=CC2 %s &&
-  // FIXME: two ellipses are showing up when they shouldn't
-  // CHECK-CC2: int k
+  // FIXME: two extra overloads are showing up!
+  // CHECK-CC2: f(int i, int j, <#int k#>)
   // RUN: true
 }
