14 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SOURCECODE_H 15 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SOURCECODE_H 17 #include "clang/Basic/SourceLocation.h" 18 #include "clang/Tooling/Core/Replacement.h" 32 llvm::Expected<size_t>
34 bool AllowColumnsBeyondLineLength =
true);
56 std::pair<llvm::StringRef, llvm::StringRef>
62 const tooling::Replacements &Repls);
66 const SourceManager &SourceMgr);
SourceLocation Loc
'#' location in the include directive
std::pair< size_t, size_t > offsetToClangLineColumn(StringRef Code, size_t Offset)
llvm::Expected< size_t > positionToOffset(StringRef Code, Position P, bool AllowColumnsBeyondLineLength)
TextEdit replacementToEdit(StringRef Code, const tooling::Replacement &R)
std::vector< TextEdit > replacementsToEdits(StringRef Code, const tooling::Replacements &Repls)
Position sourceLocToPosition(const SourceManager &SM, SourceLocation Loc)
Turn a SourceLocation into a [line, column] pair.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
CharSourceRange Range
SourceRange for the file name.
std::pair< llvm::StringRef, llvm::StringRef > splitQualifiedName(llvm::StringRef QName)
From "a::b::c", return {"a::b::", "c"}.
llvm::Optional< std::string > getAbsoluteFilePath(const FileEntry *F, const SourceManager &SourceMgr)
Get the absolute file path of a given file entry.
Range halfOpenToRange(const SourceManager &SM, CharSourceRange R)
Position offsetToPosition(StringRef Code, size_t Offset)