//===---------------- SemaCodeComplete.cpp - Code Completion ----*- C++ -*-===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file defines the code-completion semantic actions.////===----------------------------------------------------------------------===//#include"Sema.h"#include"clang/Sema/CodeCompleteConsumer.h"#include"clang/AST/ExprCXX.h"#include"clang/Lex/MacroInfo.h"#include"clang/Lex/Preprocessor.h"#include"llvm/ADT/SmallPtrSet.h"#include"llvm/ADT/StringExtras.h"#include<list>#include<map>#include<vector>usingnamespaceclang;/// \brief Set the code-completion consumer for semantic analysis.voidSema::setCodeCompleteConsumer(CodeCompleteConsumer*CCC){assert(((CodeCompleter!=0)!=(CCC!=0))&&"Already set or cleared a code-completion consumer?");CodeCompleter=CCC;}namespace{/// \brief A container of code-completion results.classResultBuilder{public:/// \brief The type of a name-lookup filter, which can be provided to the/// name-lookup routines to specify which declarations should be included in/// the result set (when it returns true) and which declarations should be/// filtered out (returns false).typedefbool(ResultBuilder::*LookupFilter)(NamedDecl*)const;