clang-tools 20.0.0git
Namespaces | Macros | Functions
Quality.cpp File Reference
#include "Quality.h"
#include "AST.h"
#include "ASTSignals.h"
#include "FileDistance.h"
#include "SourceCode.h"
#include "index/Symbol.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclVisitor.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Sema/CodeCompleteConsumer.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cmath>
#include <optional>

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 MAP(DeclType, Category)
 

Functions

static bool clang::clangd::hasDeclInMainFile (const Decl &D)
 
static bool clang::clangd::hasUsingDeclInMainFile (const CodeCompletionResult &R)
 
static SymbolQualitySignals::SymbolCategory clang::clangd::categorize (const NamedDecl &ND)
 
static SymbolQualitySignals::SymbolCategory clang::clangd::categorize (const CodeCompletionResult &R)
 
static SymbolQualitySignals::SymbolCategory clang::clangd::categorize (const index::SymbolInfo &D)
 
static bool clang::clangd::isInstanceMember (const NamedDecl *ND)
 
static bool clang::clangd::isInstanceMember (const index::SymbolInfo &D)
 
llvm::raw_ostream & clang::clangd::operator<< (llvm::raw_ostream &OS, const SymbolQualitySignals &S)
 
static SymbolRelevanceSignals::AccessibleScope clang::clangd::computeScope (const NamedDecl *D)
 
static float clang::clangd::fileProximityScore (unsigned FileDistance)
 
static float clang::clangd::scopeProximityScore (unsigned ScopeDistance)
 
static std::optional< llvm::StringRef > clang::clangd::wordMatching (llvm::StringRef Name, const llvm::StringSet<> *ContextWords)
 
llvm::raw_ostream & clang::clangd::operator<< (llvm::raw_ostream &OS, const SymbolRelevanceSignals &S)
 
float clang::clangd::evaluateSymbolAndRelevance (float SymbolQuality, float SymbolRelevance)
 Combine symbol quality and relevance into a single score.
 
static uint32_t clang::clangd::encodeFloat (float F)
 
std::string clang::clangd::sortText (float Score, llvm::StringRef Tiebreak="")
 Returns a string that sorts in the same order as (-Score, Tiebreak), for LSP.
 
llvm::raw_ostream & clang::clangd::operator<< (llvm::raw_ostream &OS, const SignatureQualitySignals &S)
 

Macro Definition Documentation

◆ MAP

#define MAP (   DeclType,
  Category 
)
Value:
SymbolQualitySignals::SymbolCategory Visit##DeclType(const DeclType *) { \
return SymbolQualitySignals::Category; \
}