clang-tools  8.0.0
Namespaces | Macros | Functions
CodeComplete.cpp File Reference
#include "CodeComplete.h"
#include "AST.h"
#include "ClangdUnit.h"
#include "CodeCompletionStrings.h"
#include "Compiler.h"
#include "Diagnostics.h"
#include "ExpectedTypes.h"
#include "FileDistance.h"
#include "FuzzyMatch.h"
#include "Headers.h"
#include "Logger.h"
#include "Quality.h"
#include "SourceCode.h"
#include "TUScheduler.h"
#include "Trace.h"
#include "URI.h"
#include "index/Index.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Format/Format.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Sema/CodeCompleteConsumer.h"
#include "clang/Sema/Sema.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/ScopedPrinter.h"
#include <algorithm>
#include <iterator>
Include dependency graph for CodeComplete.cpp:

Go to the source code of this file.

Namespaces

 clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
 clang::clangd
 

Macros

#define DEBUG_TYPE   "CodeComplete"
 

Functions

llvm::Expected< llvm::StringRef > clang::clangd::speculateCompletionFilter (llvm::StringRef Content, Position Pos)
 Retrives a speculative code completion filter text before the cursor. More...
 
CodeCompleteResult clang::clangd::codeComplete (PathRef FileName, const tooling::CompileCommand &Command, const PreambleData *Preamble, llvm::StringRef Contents, Position Pos, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > VFS, std::shared_ptr< PCHContainerOperations > PCHs, CodeCompleteOptions Opts, SpeculativeFuzzyFind *SpecFuzzyFind)
 
SignatureHelp clang::clangd::signatureHelp (PathRef FileName, const tooling::CompileCommand &Command, const PreambleData *Preamble, llvm::StringRef Contents, Position Pos, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > VFS, std::shared_ptr< PCHContainerOperations > PCHs, const SymbolIndex *Index)
 
bool clang::clangd::isIndexedForCodeCompletion (const NamedDecl &ND, ASTContext &ASTCtx)
 
llvm::raw_ostream & clang::clangd::operator<< (llvm::raw_ostream &OS, const CodeCompletion &C)
 
llvm::raw_ostream & clang::clangd::operator<< (llvm::raw_ostream &OS, const CodeCompleteResult &R)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "CodeComplete"

Definition at line 60 of file CodeComplete.cpp.

Variable Documentation

◆ AccessibleScopes

std::vector<std::string> AccessibleScopes

Definition at line 541 of file CodeComplete.cpp.

◆ CCContext

CodeCompletionContext CCContext

Definition at line 703 of file CodeComplete.cpp.

◆ CCSema

Sema* CCSema = nullptr

Definition at line 704 of file CodeComplete.cpp.

◆ Command

const tooling::CompileCommand& Command

Definition at line 1005 of file CodeComplete.cpp.

Referenced by clang::clangd::asCommand(), and clang::clangd::signatureHelp().

◆ Contents

llvm::StringRef Contents

◆ FileName

PathRef FileName

◆ IDForDoc

llvm::Optional<SymbolID> IDForDoc

Definition at line 807 of file CodeComplete.cpp.

◆ IndexResult

const Symbol* IndexResult = nullptr

Definition at line 209 of file CodeComplete.cpp.

◆ Name

llvm::StringRef Name

Definition at line 206 of file CodeComplete.cpp.

Referenced by clang::find_all_symbols::SymbolInfo::SymbolInfo().

◆ PCHs

std::shared_ptr<PCHContainerOperations> PCHs

◆ Pos

Position Pos

◆ Preamble

const PreambleData* Preamble

Definition at line 1006 of file CodeComplete.cpp.

Referenced by clang::clangd::signatureHelp().

◆ Quality

SignatureQualitySignals Quality

Definition at line 809 of file CodeComplete.cpp.

◆ RankedIncludeHeaders

llvm::SmallVector<llvm::StringRef, 1> RankedIncludeHeaders

Definition at line 210 of file CodeComplete.cpp.

◆ Results

std::vector<CodeCompletionResult> Results

◆ ReturnType

std::string ReturnType

◆ SemaResult

const CodeCompletionResult* SemaResult = nullptr

Definition at line 208 of file CodeComplete.cpp.

◆ Signature

SignatureInformation Signature

Definition at line 416 of file CodeComplete.cpp.

◆ SnippetSuffix

std::string SnippetSuffix

Definition at line 415 of file CodeComplete.cpp.

◆ UnresolvedQualifier

llvm::Optional<std::string> UnresolvedQualifier

Definition at line 544 of file CodeComplete.cpp.

◆ VFS

llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS

Definition at line 1009 of file CodeComplete.cpp.

Referenced by clang::clangd::prepareCompilerInstance().