From 3b7d48dabc962ddb9075a2e225dcd23bdda90d7a Mon Sep 17 00:00:00 2001 From: Francisco Lopes da Silva Date: Fri, 23 Jan 2015 13:17:51 +0000 Subject: [PATCH] Sema: code completion for variadic prototypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226908 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaCodeComplete.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index add469b97a..aa8629c62b 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -3966,9 +3966,11 @@ void Sema::CodeCompleteCall(Scope *S, Expr *Fn, ArrayRef Args) { if (auto FP = T->getAs()) { if (!TooManyArguments(FP->getNumParams(), Args.size(), - /*PartialOverloading=*/true)) + /*PartialOverloading=*/true) || + FP->isVariadic()) Results.push_back(ResultCandidate(FP)); } else if (auto FT = T->getAs()) + // No prototype and declaration, it may be a K & R style function. Results.push_back(ResultCandidate(FT)); } } -- 2.50.1