clang-tools 20.0.0git
|
#include "CodeComplete.h"
#include "AST.h"
#include "CodeCompletionStrings.h"
#include "Compiler.h"
#include "Config.h"
#include "ExpectedTypes.h"
#include "Feature.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 "URI.h"
#include "index/Index.h"
#include "index/Symbol.h"
#include "index/SymbolOrigin.h"
#include "support/Logger.h"
#include "support/Markup.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/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/ScopedPrinter.h"
#include <algorithm>
#include <iterator>
#include <limits>
#include <optional>
#include <utility>
Go to the source code of this file.
Namespaces | |
namespace | clang |
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===// | |
namespace | clang::clangd |
FIXME: Skip testing on windows temporarily due to the different escaping code mode. | |
Macros | |
#define | DEBUG_TYPE "CodeComplete" |
Functions | |
CompletionPrefix | clang::clangd::guessCompletionPrefix (llvm::StringRef Content, unsigned Offset) |
CodeCompleteResult | clang::clangd::codeCompleteComment (PathRef FileName, unsigned Offset, llvm::StringRef Prefix, const PreambleData *Preamble, const ParseInputs &ParseInput) |
std::optional< unsigned > | clang::clangd::maybeFunctionArgumentCommentStart (llvm::StringRef Content) |
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 . | |
SignatureHelp | clang::clangd::signatureHelp (PathRef FileName, Position Pos, const PreambleData &Preamble, const ParseInputs &ParseInput, MarkupKind DocumentationFormat) |
Get signature help at a specified Pos in FileName . | |
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) |
bool | clang::clangd::isIncludeFile (llvm::StringRef Line) |
bool | clang::clangd::allowImplicitCompletion (llvm::StringRef Content, unsigned Offset) |
#define DEBUG_TYPE "CodeComplete" |
Definition at line 77 of file CodeComplete.cpp.
std::vector<std::string> AccessibleScopes |
Definition at line 717 of file CodeComplete.cpp.
bool AllowAllScopes = false |
Definition at line 727 of file CodeComplete.cpp.
CodeCompletionContext CCContext |
Definition at line 914 of file CodeComplete.cpp.
Sema* CCSema = nullptr |
Definition at line 915 of file CodeComplete.cpp.
std::optional<std::string> EnclosingNamespace |
Definition at line 725 of file CodeComplete.cpp.
PathRef FileName |
Definition at line 1333 of file CodeComplete.cpp.
const RawIdentifier* IdentifierResult = nullptr |
Definition at line 221 of file CodeComplete.cpp.
SymbolID IDForDoc |
Definition at line 1026 of file CodeComplete.cpp.
const Symbol* IndexResult = nullptr |
Definition at line 220 of file CodeComplete.cpp.
Referenced by clang::clangd::SymbolQualitySignals::merge(), and clang::clangd::SymbolRelevanceSignals::merge().
llvm::StringRef Name |
Definition at line 210 of file CodeComplete.cpp.
size_t Offset |
Definition at line 1334 of file CodeComplete.cpp.
Referenced by clang::tidy::utils::IncludeSorter::addInclude(), clang::tidy::readability::advanceBeyondCurrentLine(), clang::clangd::allowImplicitCompletion(), clang::tidy::utils::FormatStringConverter::applyFixes(), clang::clangd::buildRenameEdit(), clang::tidy::bugprone::StringLiteralWithEmbeddedNulCheck::check(), clang::tidy::modernize::UseUsingCheck::check(), clang::clangd::codeComplete(), clang::clangd::codeCompleteComment(), llvm::yaml::MappingTraits< tooling::Range >::NormalizedRange::denormalize(), clang::clangd::diffTokens(), clang::clangd::findDocumentHighlights(), clang::clangd::findRecordTypeAt(), clang::clangd::findType(), clang::clangd::formatOffset(), clang::clangd::ClangdServer::getAST(), clang::clangd::getBacktickQuoteRange(), clang::clangd::getHover(), clang::tidy::readability::getLocationOfConst(), clang::clangd::getSemanticRanges(), Modularize::getSourceLocationFile(), clang::clangd::guessCompletionPrefix(), clang::clangd::includeHashLoc(), clang::clangd::lex(), clang::clangd::offsetToClangLineColumn(), clang::clangd::offsetToPosition(), clang::clangd::pointBounds(), clang::clangd::signatureHelp(), clang::clangd::sourceLocationInMainFile(), clang::clangd::sourceLocToPosition(), clang::clangd::SpelledWord::touching(), and clang::clangd::transformCursorPosition().
const ParseInputs& ParseInput |
Definition at line 1337 of file CodeComplete.cpp.
Referenced by clang::clangd::ClangdServer::codeComplete(), clang::clangd::codeComplete(), clang::clangd::codeCompleteComment(), clang::clangd::ClangdServer::signatureHelp(), and clang::clangd::signatureHelp().
const std::optional<PreamblePatch> Patch |
Definition at line 1336 of file CodeComplete.cpp.
Referenced by clang::clangd::ParsedAST::build().
const PreambleData& Preamble |
Definition at line 1335 of file CodeComplete.cpp.
Referenced by clang::clangd::ParsedAST::build(), clang::clangd::codeComplete(), and clang::clangd::codeCompleteComment().
SignatureQualitySignals Quality |
Definition at line 1028 of file CodeComplete.cpp.
Referenced by clang::clangd::getWorkspaceSymbols(), and clang::clangd::locateSymbolTextually().
std::vector<std::string> QueryScopes |
Definition at line 720 of file CodeComplete.cpp.
Referenced by clang::clangd::createScopeFileDistance().
llvm::SmallVector<SymbolInclude, 1> RankedIncludeHeaders |
Definition at line 222 of file CodeComplete.cpp.
unsigned References |
Definition at line 211 of file CodeComplete.cpp.
Referenced by clang::doc::genReferencesBlock().
std::vector<CodeCompletionResult> Results |
Definition at line 913 of file CodeComplete.cpp.
Referenced by clang::tidy::modernize::collectParamDecls(), clang::reorder_fields::findDefinition(), clang::reorder_fields::findMembersUsedInInitExpr(), clang::clangd::findReferences(), clang::clangd::flattenSymbolHierarchy(), clang::clangd::MemIndex::fuzzyFind(), clang::clangd::getIndexableLocalDecls(), clang::tidy::boost::UseRangesCheck::getReplacerMap(), clang::clangd::getSymbolInfo(), clang::clangd::getTypeHierarchy(), clang::clangd::incomingCalls(), clang::clangd::inlayHints(), clang::clangd::locateSymbolTextually(), clang::clangd::lookup(), clang::clangd::outgoingCalls(), clang::clangd::ClangdServer::prepareRename(), clang::include_fixer::YamlSymbolIndex::search(), clang::clangd::subTypes(), and clang::clangd::superTypes().
std::string ReturnType |
Definition at line 536 of file CodeComplete.cpp.
Referenced by clang::tidy::modernize::ReturnBracedInitListCheck::check(), clang::tidy::modernize::UseConstraintsCheck::check(), clang::tidy::modernize::UseTrailingReturnTypeCheck::check(), clang::tidy::modernize::getLambdaProperties(), and clang::clangd::CodeCompletion::render().
const CodeCompletionResult* SemaResult = nullptr |
Definition at line 219 of file CodeComplete.cpp.
Referenced by clang::clangd::SymbolRelevanceSignals::computeASTSignals().
SignatureInformation Signature |
Definition at line 535 of file CodeComplete.cpp.
Referenced by clang::tidy::utils::getFullPrefix(), clang::clangd::getSignature(), clang::clangd::SymbolCollector::handleMacroOccurrence(), clang::clangd::CodeCompletion::render(), and clang::clangd::sym().
std::string SnippetSuffix |
Definition at line 534 of file CodeComplete.cpp.
Referenced by clang::clangd::SymbolCollector::handleMacroOccurrence(), and clang::clangd::CodeCompletion::render().
std::optional<std::string> UnresolvedQualifier |
Definition at line 723 of file CodeComplete.cpp.