summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/CodeCompleteConsumer.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-09 22:16:47 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-09 22:16:47 +0000
commit58acf32af26433e367384852e3431acd7ebd92bd (patch)
tree7298be6ab49008cc173bf107825c3b605080c277 /clang/lib/Sema/CodeCompleteConsumer.cpp
parent82a108b4ed2c726bafcbd6059ee4f207bcd29ce3 (diff)
downloadbcm5719-llvm-58acf32af26433e367384852e3431acd7ebd92bd.tar.gz
bcm5719-llvm-58acf32af26433e367384852e3431acd7ebd92bd.zip
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. llvm-svn: 83680
Diffstat (limited to 'clang/lib/Sema/CodeCompleteConsumer.cpp')
-rw-r--r--clang/lib/Sema/CodeCompleteConsumer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp
index a8988a6ba83..c78ab5b3e95 100644
--- a/clang/lib/Sema/CodeCompleteConsumer.cpp
+++ b/clang/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;
}
}
OpenPOWER on IntegriCloud