clang-tools  7.0.0
Namespaces | Functions
SourceCode.h File Reference
#include "Protocol.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Tooling/Core/Replacement.h"
Include dependency graph for SourceCode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

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

Functions

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 (StringRef Code, const tooling::Replacement &R)
 
std::vector< TextEdit > clang::clangd::replacementsToEdits (StringRef Code, const tooling::Replacements &Repls)
 
llvm::Optional< std::string > clang::clangd::getAbsoluteFilePath (const FileEntry *F, const SourceManager &SourceMgr)
 Get the absolute file path of a given file entry. More...