r226908 - Sema: code completion for variadic prototypes.
Manuel Klimek
klimek at google.com
Fri Jan 23 05:25:08 PST 2015
On Fri Jan 23 2015 at 2:21:52 PM Francisco Lopes da Silva <oblita at gmail.com>
wrote:
> Author: francisco.lopes
> Date: Fri Jan 23 07:17:51 2015
> New Revision: 226908
>
> URL: http://llvm.org/viewvc/llvm-project?rev=226908&view=rev
> Log:
> Sema: code completion for variadic prototypes.
>
> Modified:
> cfe/trunk/lib/Sema/SemaCodeComplete.cpp
>
> Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/
> SemaCodeComplete.cpp?rev=226908&r1=226907&r2=226908&view=diff
> ============================================================
> ==================
> --- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Fri Jan 23 07:17:51 2015
> @@ -3966,9 +3966,11 @@ void Sema::CodeCompleteCall(Scope *S, Ex
>
> if (auto FP = T->getAs<FunctionProtoType>()) {
> if (!TooManyArguments(FP->getNumParams(), Args.size(),
> - /*PartialOverloading=*/true))
> + /*PartialOverloading=*/true) ||
> + FP->isVariadic())
>
Can you add a test for this?
> Results.push_back(ResultCandidate(FP));
> } else if (auto FT = T->getAs<FunctionType>())
> + // No prototype and declaration, it may be a K & R style function.
> Results.push_back(ResultCandidate(FT));
> }
> }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150123/1e8cbdec/attachment.html>
More information about the cfe-commits
mailing list