From: Francisco Lopes da Silva Date: Fri, 23 Jan 2015 13:17:51 +0000 (+0000) Subject: Sema: code completion for variadic prototypes. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b7d48dabc962ddb9075a2e225dcd23bdda90d7a;p=clang Sema: code completion for variadic prototypes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226908 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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)); } }