clang-tools
11.0.0
|
#include "CodeComplete.h"
#include "AST.h"
#include "CodeCompletionStrings.h"
#include "Compiler.h"
#include "Diagnostics.h"
#include "ExpectedTypes.h"
#include "FileDistance.h"
#include "FuzzyMatch.h"
#include "Headers.h"
#include "Hover.h"
#include "Preamble.h"
#include "Protocol.h"
#include "Quality.h"
#include "SourceCode.h"
#include "TUScheduler.h"
#include "URI.h"
#include "index/Index.h"
#include "index/Symbol.h"
#include "index/SymbolOrigin.h"
#include "support/Logger.h"
#include "support/Threading.h"
#include "support/ThreadsafeFS.h"
#include "support/Trace.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Format/Format.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Lex/ExternalPreprocessorSource.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Sema/CodeCompleteConsumer.h"
#include "clang/Sema/DeclSpec.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/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.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>
Go to the source code of this file.
Namespaces | |
clang | |
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===// | |
clang::clangd | |
Macros | |
#define | DEBUG_TYPE "CodeComplete" |
Functions | |
CompletionPrefix | clang::clangd::guessCompletionPrefix (llvm::StringRef Content, unsigned Offset) |
CodeCompleteResult | clang::clangd::codeComplete (PathRef FileName, Position Pos, const PreambleData *Preamble, const ParseInputs &ParseInput, CodeCompleteOptions Opts, SpeculativeFuzzyFind *SpecFuzzyFind=nullptr) |
Gets code completions at a specified Pos in FileName . More... | |
SignatureHelp | clang::clangd::signatureHelp (PathRef FileName, Position Pos, const PreambleData &Preamble, const ParseInputs &ParseInput) |
Get signature help at a specified Pos in FileName . More... | |
bool | clang::clangd::isIndexedForCodeCompletion (const NamedDecl &ND, ASTContext &ASTCtx) |
static MarkupContent | clang::clangd::renderDoc (const markup::Document &Doc, MarkupKind Kind) |
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) |
bool | clang::clangd::isIncludeFile (llvm::StringRef Line) |
bool | clang::clangd::allowImplicitCompletion (llvm::StringRef Content, unsigned Offset) |
#define DEBUG_TYPE "CodeComplete" |
Definition at line 75 of file CodeComplete.cpp.
std::vector<std::string> AccessibleScopes |
Definition at line 548 of file CodeComplete.cpp.
CodeCompletionContext CCContext |
Definition at line 713 of file CodeComplete.cpp.
Sema* CCSema = nullptr |
Definition at line 714 of file CodeComplete.cpp.
PathRef FileName |
Definition at line 1043 of file CodeComplete.cpp.
Referenced by clang::tidy::utils::IncludeSorter::AddInclude(), clang::tidy::portability::RestrictSystemIncludesCheck::contains(), clang::clangd::PreamblePatch::create(), clang::tidy::utils::IncludeSorter::CreateIncludeInsertion(), clang::pp_trace::PPCallbacksTracker::FileNotFound(), clang::clangd::MockCompilationDatabase::getCompileCommand(), clang::tidy::utils::getFileExtension(), clang::tidy::ConfigOptionsProvider::getRawOptions(), clang::tidy::FileOptionsProvider::getRawOptions(), clang::pp_trace::PPCallbacksTracker::InclusionDirective(), clang::tidy::utils::isFileExtension(), Modularize::ModularizeUtilities::isHeader(), clang::clangd::isPreambleCompatible(), clang::include_fixer::rank(), clang::find_all_symbols::YamlReporter::reportSymbols(), clang::include_fixer::SymbolIndexManager::search(), clang::clangd::IncludeInserter::shouldInsertInclude(), clang::tidy::utils::HeaderGuardCheck::shouldSuggestEndifComment(), clang::tidy::utils::HeaderGuardCheck::shouldSuggestToAddHeaderGuard(), and clang::include_fixer::similarityScore().
const RawIdentifier* IdentifierResult = nullptr |
Definition at line 171 of file CodeComplete.cpp.
llvm::Optional<SymbolID> IDForDoc |
Definition at line 817 of file CodeComplete.cpp.
const Symbol* IndexResult = nullptr |
Definition at line 170 of file CodeComplete.cpp.
Referenced by clang::clangd::SymbolQualitySignals::merge(), and clang::clangd::SymbolRelevanceSignals::merge().
llvm::StringRef Name |
Definition at line 160 of file CodeComplete.cpp.
Referenced by clang::tidy::modernize::DeclFinderASTVisitor::DeclFinderASTVisitor().
size_t Offset |
Definition at line 1044 of file CodeComplete.cpp.
Referenced by clang::tidy::utils::IncludeSorter::AddInclude(), clang::clangd::allowImplicitCompletion(), clang::clangd::buildRenameEdit(), llvm::yaml::MappingTraits< tooling::Range >::NormalizedRange::denormalize(), clang::clangd::diffTokens(), clang::clangd::TweakTest::expandCases(), clang::clangd::getBacktickQuoteRange(), clang::clangd::guessCompletionPrefix(), clang::clangd::offsetToClangLineColumn(), clang::clangd::offsetToPosition(), and clang::clangd::signatureHelp().
const ParseInputs& ParseInput |
Definition at line 1047 of file CodeComplete.cpp.
Referenced by clang::clangd::ClangdServer::signatureHelp(), and clang::clangd::signatureHelp().
const llvm::Optional<PreamblePatch> Patch |
Definition at line 1046 of file CodeComplete.cpp.
Referenced by clang::clangd::ParsedAST::build(), and clang::clangd::PreamblePatch::create().
const PreambleData& Preamble |
Definition at line 1045 of file CodeComplete.cpp.
Referenced by clang::clangd::ParsedAST::build(), clang::clangd::TestTU::build(), clang::clangd::isPreambleCompatible(), clang::clangd::prepareCompilerInstance(), clang::clangd::TUScheduler::runWithPreamble(), and clang::clangd::PreamblePatch::unmodified().
SignatureQualitySignals Quality |
Definition at line 819 of file CodeComplete.cpp.
llvm::SmallVector<llvm::StringRef, 1> RankedIncludeHeaders |
Definition at line 172 of file CodeComplete.cpp.
unsigned References |
Definition at line 161 of file CodeComplete.cpp.
Referenced by clang::doc::genReferencesBlock().
std::vector<CodeCompletionResult> Results |
Definition at line 712 of file CodeComplete.cpp.
Referenced by clang::tidy::modernize::collectParamDecls(), clang::clangd::flattenSymbolHierarchy(), clang::clangd::TUScheduler::getAllFileContents(), clang::clangd::getIndexableLocalDecls(), clang::clangd::lookup(), and clang::include_fixer::YamlSymbolIndex::search().
std::string ReturnType |
Definition at line 407 of file CodeComplete.cpp.
const CodeCompletionResult* SemaResult = nullptr |
Definition at line 169 of file CodeComplete.cpp.
SignatureInformation Signature |
Definition at line 406 of file CodeComplete.cpp.
Referenced by clang::clangd::getSignature().
std::string SnippetSuffix |
Definition at line 405 of file CodeComplete.cpp.
llvm::Optional<std::string> UnresolvedQualifier |
Definition at line 551 of file CodeComplete.cpp.