clang-tools  8.0.0
Namespaces | Typedefs | Functions
SourceCode.h File Reference
#include "Protocol.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Tooling/Core/Replacement.h"
#include "llvm/Support/SHA1.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
 

Typedefs

using clang::clangd::FileDigest = decltype(llvm::SHA1::hash({}))
 

Functions

FileDigest clang::clangd::digest (StringRef Content)
 
llvm::Optional< FileDigest > clang::clangd::digestFile (const SourceManager &SM, FileID FID)
 
size_t clang::clangd::lspLength (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 (StringRef Code, const tooling::Replacement &R)
 
std::vector< TextEdit > clang::clangd::replacementsToEdits (StringRef Code, const tooling::Replacements &Repls)
 
TextEdit clang::clangd::toTextEdit (const FixItHint &FixIt, const SourceManager &M, const LangOptions &L)
 
llvm::Optional< std::string > clang::clangd::getCanonicalPath (const FileEntry *F, const SourceManager &SourceMgr)
 Get the canonical path of F. More...
 
bool clang::clangd::IsRangeConsecutive (const Range &Left, const Range &Right)