ccls/src/clang_utils.h

29 lines
752 B
C
Raw Normal View History

#pragma once
#include "lsp_diagnostic.h"
#include <clang-c/Index.h>
#if USE_CLANG_CXX
#include <clang/Format/Format.h>
#endif
#include <optional.h>
2017-09-22 01:14:57 +00:00
#include <vector>
optional<lsDiagnostic> BuildAndDisposeDiagnostic(CXDiagnostic diagnostic,
const std::string& path);
2017-05-21 03:46:15 +00:00
// Returns the absolute path to |file|.
std::string FileName(CXFile file);
std::string ToString(CXString cx_string);
std::string ToString(CXCursorKind cursor_kind);
// Converts Clang formatting replacement operations into LSP text edits.
#if USE_CLANG_CXX
std::vector<lsTextEdit> ConvertClangReplacementsIntoTextEdits(
2018-01-11 02:43:01 +00:00
llvm::StringRef document,
const std::vector<clang::tooling::Replacement>& clang_replacements);
#endif