aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Sema/CodeCompleteConsumer.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-18 17:42:29 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-18 17:42:29 +0000
commit33224e61bfca370850abae89bbd415a4dabe07fa (patch)
tree2ecd0a1991f2e7494615d765d8f8e625fa7d8a7d /include/clang/Sema/CodeCompleteConsumer.h
parent9436ed50b0923368d5ae7a97f1b67c56b6837430 (diff)
For code completion in C++ member access expressions and tag names,
look into the current scope for anything that could start a nested-names-specifier. These results are ranked worse than any of the results actually found in the lexical scope. Perform a little more pruning of the result set, eliminating constructors, __va_list_tag, and any duplication of declarations in the result set. For the latter, implemented NamespaceDecl::getCanonicalDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/CodeCompleteConsumer.h')
-rw-r--r--include/clang/Sema/CodeCompleteConsumer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h
index 425a937a93..ce5707ed3a 100644
--- a/include/clang/Sema/CodeCompleteConsumer.h
+++ b/include/clang/Sema/CodeCompleteConsumer.h
@@ -15,6 +15,7 @@
#include "clang/AST/DeclarationName.h"
#include "clang/AST/Type.h"
+#include "llvm/ADT/SmallPtrSet.h"
#include <list>
#include <map>
#include <vector>
@@ -25,6 +26,7 @@ class raw_ostream;
namespace clang {
+class Decl;
class DeclContext;
class NamedDecl;
class Scope;
@@ -89,6 +91,11 @@ public:
/// \brief The actual results we have found.
std::vector<Result> Results;
+ /// \brief A record of all of the declarations we have found and placed
+ /// into the result set, used to ensure that no declaration ever gets into
+ /// the result set twice.
+ llvm::SmallPtrSet<Decl*, 16> AllDeclsFound;
+
/// \brief A mapping from declaration names to the declarations that have
/// this name within a particular scope and their index within the list of
/// results.