2017-05-20 06:35:14 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "language_server_api.h"
|
|
|
|
|
|
|
|
#include <clang-c/Index.h>
|
2017-12-31 22:15:03 +00:00
|
|
|
#if USE_CLANG_CXX
|
2017-12-25 17:04:10 +00:00
|
|
|
#include <clang/Format/Format.h>
|
2017-12-31 22:15:03 +00:00
|
|
|
#endif
|
2017-05-20 06:35:14 +00:00
|
|
|
#include <optional.h>
|
2017-12-29 16:29:10 +00:00
|
|
|
|
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);
|
2017-11-04 22:29:03 +00:00
|
|
|
|
|
|
|
std::string ToString(CXString cx_string);
|
|
|
|
|
2017-12-25 17:04:10 +00:00
|
|
|
std::string ToString(CXCursorKind cursor_kind);
|
|
|
|
|
|
|
|
// Converts Clang formatting replacement operations into LSP text edits.
|
2017-12-31 22:15:03 +00:00
|
|
|
#if USE_CLANG_CXX
|
2017-12-25 17:04:10 +00:00
|
|
|
std::vector<lsTextEdit> ConvertClangReplacementsIntoTextEdits(
|
2018-01-11 02:43:01 +00:00
|
|
|
llvm::StringRef document,
|
|
|
|
const std::vector<clang::tooling::Replacement>& clang_replacements);
|
2017-12-31 22:15:03 +00:00
|
|
|
#endif
|