clang-tools  8.0.0
Namespaces | Functions
SourceCode.cpp File Reference
#include "SourceCode.h"
#include "Logger.h"
#include "clang/AST/ASTContext.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/Path.h"
Include dependency graph for SourceCode.cpp:

Go to the source code of this file.

Namespaces

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

Functions

template<typename Callback >
static bool clang::clangd::iterateCodepoints (llvm::StringRef U8, const Callback &CB)
 
static size_t clang::clangd::measureUTF16 (llvm::StringRef U8, int U16Units, bool &Valid)
 
size_t clang::clangd::lspLength (llvm::StringRef Code)
 
llvm::Expected< size_t > clang::clangd::positionToOffset (llvm::StringRef Code, Position P, bool AllowColumnsBeyondLineLength=true)
 Turn a [line, column] pair into an offset in Code. More...
 
Position clang::clangd::offsetToPosition (llvm::StringRef Code, size_t Offset)
 Turn an offset in Code into a [line, column] pair. More...
 
Position clang::clangd::sourceLocToPosition (const SourceManager &SM, SourceLocation Loc)
 Turn a SourceLocation into a [line, column] pair. More...
 
Range clang::clangd::halfOpenToRange (const SourceManager &SM, CharSourceRange R)
 
std::pair< size_t, size_t > clang::clangd::offsetToClangLineColumn (llvm::StringRef Code, size_t Offset)
 
std::pair< llvm::StringRef, llvm::StringRef > clang::clangd::splitQualifiedName (llvm::StringRef QName)
 From "a::b::c", return {"a::b::", "c"}. More...
 
TextEdit clang::clangd::replacementToEdit (llvm::StringRef Code, const tooling::Replacement &R)
 
std::vector< TextEdit > clang::clangd::replacementsToEdits (llvm::StringRef Code, const tooling::Replacements &Repls)
 
llvm::Optional< std::string > clang::clangd::getCanonicalPath (const FileEntry *F, const SourceManager &SourceMgr)
 Get the canonical path of F. More...
 
TextEdit clang::clangd::toTextEdit (const FixItHint &FixIt, const SourceManager &M, const LangOptions &L)
 
bool clang::clangd::IsRangeConsecutive (const Range &Left, const Range &Right)
 
FileDigest clang::clangd::digest (llvm::StringRef Content)
 
llvm::Optional< FileDigest > clang::clangd::digestFile (const SourceManager &SM, FileID FID)