mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 19:32:35 +00:00
Sema: code completion for variadic prototypes.
llvm-svn: 226908
This commit is contained in:
parent
8cd5f6f41b
commit
62a9a4fc9b
@ -3966,9 +3966,11 @@ void Sema::CodeCompleteCall(Scope *S, Expr *Fn, ArrayRef<Expr *> Args) {
|
||||
|
||||
if (auto FP = T->getAs<FunctionProtoType>()) {
|
||||
if (!TooManyArguments(FP->getNumParams(), Args.size(),
|
||||
/*PartialOverloading=*/true))
|
||||
/*PartialOverloading=*/true) ||
|
||||
FP->isVariadic())
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user