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

Definition at line 1007 of file CodeComplete.cpp.

Referenced by clang::clangd::DraftStore::addDraft(), clang::clangd::signatureHelp(), clang::clangd::DraftStore::updateDraft(), and clang::clangd::FileIndex::updateMain().

## ◆ FileName

PathRef FileName

Definition at line 1004 of file CodeComplete.cpp.

Referenced by clang::tidy::utils::IncludeSorter::AddInclude(), clang::include_fixer::SymbolIndexManager::addSymbolIndex(), Modularize::PreprocessorTracker::create(), clang::tidy::utils::IncludeInserter::CreateIncludeInsertion(), clang::tidy::utils::IncludeSorter::current_FileID(), clang::tidy::utils::defaultHeaderFileExtensions(), clang::tidy::DefaultOptionsProvider::getGlobalOptions(), clang::tidy::llvm::getPriority(), clang::tidy::ClangTidyDiagnosticConsumer::HandleDiagnostic(), clang::find_all_symbols::YamlReporter::reportSymbols(), clang::tidy::fuchsia::RestrictedIncludesPPCallbacks::RestrictedIncludesPPCallbacks(), clang::clangd::signatureHelp(), and clang::clangd::TUScheduler::ASTCache::take().

## ◆ 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

Definition at line 1010 of file CodeComplete.cpp.

Referenced by clang::clangd::ClangdServer::dynamicIndex(), and clang::clangd::prepareCompilerInstance().

## ◆ Pos

Position Pos

Definition at line 1008 of file CodeComplete.cpp.

Referenced by clang::query::QueryParser::complete(), llvm::yaml::NormalizedPosition::denormalize(), clang::clangd::ClangdServer::findDefinitions(), clang::clangd::ClangdServer::findDocumentHighlights(), clang::clangd::ClangdServer::findHover(), clang::clangd::offsetToPosition(), clang::clangd::URI::parse(), clang::clangd::ClangdServer::rename(), clang::clangd::ClangdServer::signatureHelp(), clang::clangd::signatureHelp(), clang::clangd::splitQualifiedName(), and clang::clangd::ClangdServer::symbolInfo().

## ◆ 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

Definition at line 702 of file CodeComplete.cpp.

Referenced by clang::tidy::modernize::collectParamDecls(), clang::include_fixer::YamlSymbolIndex::search(), and clang::throwsException().

## ◆ ReturnType

std::string ReturnType

Definition at line 417 of file CodeComplete.cpp.

Referenced by clang::tidy::cert::PostfixOperatorCheck::check(), clang::tidy::modernize::ReturnBracedInitListCheck::check(), and clang::doc::FunctionInfo::merge().

## ◆ 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().