diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-10-09 22:16:47 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-10-09 22:16:47 +0000 |
commit | f52cedee8701dca77bcbba5c705b6e388680ae56 (patch) | |
tree | ae58027e7b4ed73f86fbffee820687a162946a94 /lib/Sema/CodeCompleteConsumer.cpp | |
parent | 4f089110e383a5b7e5a196c52e5e45d06f9d0754 (diff) |
Minor tweaks for code-completion:
- Filter out unnamed declarations
- Filter out declarations whose names are reserved for the
implementation (e.g., __bar, _Foo)
- Place OVERLOAD: or COMPLETION: at the beginning of each
code-completion result, so we can easily separate them from other
compilation results.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/CodeCompleteConsumer.cpp')
-rw-r--r-- | lib/Sema/CodeCompleteConsumer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/CodeCompleteConsumer.cpp b/lib/Sema/CodeCompleteConsumer.cpp index a8988a6ba8..c78ab5b3e9 100644 --- a/lib/Sema/CodeCompleteConsumer.cpp +++ b/lib/Sema/CodeCompleteConsumer.cpp @@ -137,6 +137,7 @@ PrintingCodeCompleteConsumer::ProcessCodeCompleteResults(Result *Results, unsigned NumResults) { // Print the results. for (unsigned I = 0; I != NumResults; ++I) { + OS << "COMPLETION: "; switch (Results[I].Kind) { case Result::RK_Declaration: OS << Results[I].Declaration->getNameAsString() << " : " @@ -171,7 +172,7 @@ PrintingCodeCompleteConsumer::ProcessOverloadCandidates(unsigned CurrentArg, for (unsigned I = 0; I != NumCandidates; ++I) { if (CodeCompletionString *CCS = Candidates[I].CreateSignatureString(CurrentArg, SemaRef)) { - OS << CCS->getAsString() << "\n"; + OS << "OVERLOAD: " << CCS->getAsString() << "\n"; delete CCS; } } |