Refactor and simplify the CodeCompleteConsumer, so that all of the
real work is performed within Sema. Addresses Chris's comments, but
still retains the heavyweight list-of-multimaps data structure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82459 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/ParseAST.cpp b/lib/Sema/ParseAST.cpp
index be19b7e..d09af0a 100644
--- a/lib/Sema/ParseAST.cpp
+++ b/lib/Sema/ParseAST.cpp
@@ -64,8 +64,10 @@
}
CodeCompleteConsumer *CodeCompleter = 0;
- if (CreateCodeCompleter)
+ if (CreateCodeCompleter) {
CodeCompleter = CreateCodeCompleter(S, CreateCodeCompleterData);
+ S.setCodeCompleteConsumer(CodeCompleter);
+ }
Parser::DeclGroupPtrTy ADecl;