diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-23 00:16:58 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-23 00:16:58 +0000 |
commit | 0594438e06f58ab3798416324780ab39ca9c8f54 (patch) | |
tree | 89c539ff1c473d05a56b8a8ca2b68af630969483 /lib/Sema/SemaCodeComplete.cpp | |
parent | 8e0a0e4e4554ab31d793413e0fb4d9532872a53a (diff) |
Separate the code-completion results for call completion from the
results for other, textual completion. For call completion, we now
produce enough information to show the function call argument that we
are currently on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | lib/Sema/SemaCodeComplete.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index ec01941901..754d505bc0 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -1161,19 +1161,17 @@ void Sema::CodeCompleteCall(Scope *S, ExprTy *FnIn, IsBetterOverloadCandidate(*this)); // Add the remaining viable overload candidates as code-completion reslults. - typedef CodeCompleteConsumer::Result Result; - ResultBuilder Results(*this); - Results.EnterNewScope(); + typedef CodeCompleteConsumer::OverloadCandidate ResultCandidate; + llvm::SmallVector<ResultCandidate, 8> Results; for (OverloadCandidateSet::iterator Cand = CandidateSet.begin(), CandEnd = CandidateSet.end(); Cand != CandEnd; ++Cand) { if (Cand->Viable) - Results.MaybeAddResult(Result(Cand->Function, 0), 0); + Results.push_back(ResultCandidate(Cand->Function)); } - - Results.ExitScope(); - HandleCodeCompleteResults(CodeCompleter, Results.data(), Results.size()); + CodeCompleter->ProcessOverloadCandidates(NumArgs, Results.data(), + Results.size()); } void Sema::CodeCompleteQualifiedId(Scope *S, const CXXScopeSpec &SS, |