mirror of https://gitlab.com/cppit/libclangmm
39 changed files with 107 additions and 107 deletions
@ -1,17 +0,0 @@ |
|||||||
#ifndef CLANGMM_H_ |
|
||||||
#define CLANGMM_H_ |
|
||||||
#include "code_complete_results.h" |
|
||||||
#include "compilation_database.h" |
|
||||||
#include "compile_command.h" |
|
||||||
#include "compile_commands.h" |
|
||||||
#include "completion_string.h" |
|
||||||
#include "cursor.h" |
|
||||||
#include "diagnostic.h" |
|
||||||
#include "index.h" |
|
||||||
#include "source_location.h" |
|
||||||
#include "source_range.h" |
|
||||||
#include "token.h" |
|
||||||
#include "tokens.h" |
|
||||||
#include "translation_unit.h" |
|
||||||
#include "utility.h" |
|
||||||
#endif // CLANGMM_H_
|
|
||||||
@ -0,0 +1,17 @@ |
|||||||
|
#ifndef CLANGMM_H_ |
||||||
|
#define CLANGMM_H_ |
||||||
|
#include "code_complete_results.hpp" |
||||||
|
#include "compilation_database.hpp" |
||||||
|
#include "compile_command.hpp" |
||||||
|
#include "compile_commands.hpp" |
||||||
|
#include "completion_string.hpp" |
||||||
|
#include "cursor.hpp" |
||||||
|
#include "diagnostic.hpp" |
||||||
|
#include "index.hpp" |
||||||
|
#include "source_location.hpp" |
||||||
|
#include "source_range.hpp" |
||||||
|
#include "token.hpp" |
||||||
|
#include "tokens.hpp" |
||||||
|
#include "translation_unit.hpp" |
||||||
|
#include "utility.hpp" |
||||||
|
#endif // CLANGMM_H_
|
||||||
@ -1,6 +1,6 @@ |
|||||||
#include "code_complete_results.h" |
#include "code_complete_results.hpp" |
||||||
#include "completion_string.h" |
#include "completion_string.hpp" |
||||||
#include "utility.h" |
#include "utility.hpp" |
||||||
|
|
||||||
clangmm::CodeCompleteResults::CodeCompleteResults(CXTranslationUnit &cx_tu, |
clangmm::CodeCompleteResults::CodeCompleteResults(CXTranslationUnit &cx_tu, |
||||||
const std::string &buffer, |
const std::string &buffer, |
||||||
@ -1,6 +1,6 @@ |
|||||||
#ifndef CODECOMPLETERESULTS_H_ |
#ifndef CODECOMPLETERESULTS_H_ |
||||||
#define CODECOMPLETERESULTS_H_ |
#define CODECOMPLETERESULTS_H_ |
||||||
#include "completion_string.h" |
#include "completion_string.hpp" |
||||||
#include <clang-c/Index.h> |
#include <clang-c/Index.h> |
||||||
#include <map> |
#include <map> |
||||||
#include <string> |
#include <string> |
||||||
@ -1,4 +1,4 @@ |
|||||||
#include "compilation_database.h" |
#include "compilation_database.hpp" |
||||||
#include <exception> |
#include <exception> |
||||||
|
|
||||||
clangmm::CompilationDatabase::CompilationDatabase(const std::string &project_path) { |
clangmm::CompilationDatabase::CompilationDatabase(const std::string &project_path) { |
||||||
@ -1,6 +1,6 @@ |
|||||||
#include "compile_command.h" |
#include "compile_command.hpp" |
||||||
#include "compile_commands.h" |
#include "compile_commands.hpp" |
||||||
#include "utility.h" |
#include "utility.hpp" |
||||||
|
|
||||||
std::vector<std::string> clangmm::CompileCommand::get_arguments() { |
std::vector<std::string> clangmm::CompileCommand::get_arguments() { |
||||||
unsigned size = clang_CompileCommand_getNumArgs(cx_command); |
unsigned size = clang_CompileCommand_getNumArgs(cx_command); |
||||||
@ -1,4 +1,4 @@ |
|||||||
#include "compile_commands.h" |
#include "compile_commands.hpp" |
||||||
|
|
||||||
clangmm::CompileCommands::CompileCommands(const std::string &filename, CompilationDatabase &db) { |
clangmm::CompileCommands::CompileCommands(const std::string &filename, CompilationDatabase &db) { |
||||||
if(!filename.empty()) |
if(!filename.empty()) |
||||||
@ -1,7 +1,7 @@ |
|||||||
#ifndef COMPILECOMMANDS_H_ |
#ifndef COMPILECOMMANDS_H_ |
||||||
#define COMPILECOMMANDS_H_ |
#define COMPILECOMMANDS_H_ |
||||||
#include "compilation_database.h" |
#include "compilation_database.hpp" |
||||||
#include "compile_command.h" |
#include "compile_command.hpp" |
||||||
#include <clang-c/CXCompilationDatabase.h> |
#include <clang-c/CXCompilationDatabase.h> |
||||||
#include <string> |
#include <string> |
||||||
#include <vector> |
#include <vector> |
||||||
@ -1,5 +1,5 @@ |
|||||||
#include "completion_string.h" |
#include "completion_string.hpp" |
||||||
#include "utility.h" |
#include "utility.hpp" |
||||||
|
|
||||||
clangmm::CompletionChunk::CompletionChunk(std::string text, CompletionChunkKind kind) |
clangmm::CompletionChunk::CompletionChunk(std::string text, CompletionChunkKind kind) |
||||||
: text(std::move(text)), kind(kind) {} |
: text(std::move(text)), kind(kind) {} |
||||||
@ -1,6 +1,6 @@ |
|||||||
#ifndef COMPLETIONSTRING_H_ |
#ifndef COMPLETIONSTRING_H_ |
||||||
#define COMPLETIONSTRING_H_ |
#define COMPLETIONSTRING_H_ |
||||||
#include "cursor.h" |
#include "cursor.hpp" |
||||||
#include <clang-c/Index.h> |
#include <clang-c/Index.h> |
||||||
#include <string> |
#include <string> |
||||||
#include <vector> |
#include <vector> |
||||||
@ -1,5 +1,5 @@ |
|||||||
#include "cursor.h" |
#include "cursor.hpp" |
||||||
#include "utility.h" |
#include "utility.hpp" |
||||||
|
|
||||||
std::string clangmm::Cursor::Type::get_spelling() const { |
std::string clangmm::Cursor::Type::get_spelling() const { |
||||||
return to_string(clang_getTypeSpelling(cx_type)); |
return to_string(clang_getTypeSpelling(cx_type)); |
||||||
@ -1,7 +1,7 @@ |
|||||||
#ifndef CURSOR_H_ |
#ifndef CURSOR_H_ |
||||||
#define CURSOR_H_ |
#define CURSOR_H_ |
||||||
#include "source_location.h" |
#include "source_location.hpp" |
||||||
#include "source_range.h" |
#include "source_range.hpp" |
||||||
#include <clang-c/Index.h> |
#include <clang-c/Index.h> |
||||||
#include <string> |
#include <string> |
||||||
#include <unordered_set> |
#include <unordered_set> |
||||||
@ -1,7 +1,7 @@ |
|||||||
#include "diagnostic.h" |
#include "diagnostic.hpp" |
||||||
#include "source_location.h" |
#include "source_location.hpp" |
||||||
#include "tokens.h" |
#include "tokens.hpp" |
||||||
#include "utility.h" |
#include "utility.hpp" |
||||||
|
|
||||||
clangmm::Diagnostic::Diagnostic(CXTranslationUnit &cx_tu, CXDiagnostic &cx_diagnostic) { |
clangmm::Diagnostic::Diagnostic(CXTranslationUnit &cx_tu, CXDiagnostic &cx_diagnostic) { |
||||||
severity = static_cast<Severity>(clang_getDiagnosticSeverity(cx_diagnostic)); |
severity = static_cast<Severity>(clang_getDiagnosticSeverity(cx_diagnostic)); |
||||||
@ -1,6 +1,6 @@ |
|||||||
#ifndef DIAGNOSTIC_H_ |
#ifndef DIAGNOSTIC_H_ |
||||||
#define DIAGNOSTIC_H_ |
#define DIAGNOSTIC_H_ |
||||||
#include "source_range.h" |
#include "source_range.hpp" |
||||||
#include <clang-c/Index.h> |
#include <clang-c/Index.h> |
||||||
#include <string> |
#include <string> |
||||||
#include <vector> |
#include <vector> |
||||||
@ -1,4 +1,4 @@ |
|||||||
#include "index.h" |
#include "index.hpp" |
||||||
|
|
||||||
clangmm::Index::Index(int excludeDeclarationsFromPCH, int displayDiagnostics) { |
clangmm::Index::Index(int excludeDeclarationsFromPCH, int displayDiagnostics) { |
||||||
cx_index = clang_createIndex(excludeDeclarationsFromPCH, displayDiagnostics); |
cx_index = clang_createIndex(excludeDeclarationsFromPCH, displayDiagnostics); |
||||||
@ -1,5 +1,5 @@ |
|||||||
#include "source_location.h" |
#include "source_location.hpp" |
||||||
#include "utility.h" |
#include "utility.hpp" |
||||||
|
|
||||||
// // // // // // // //
|
// // // // // // // //
|
||||||
// SourceLocation //
|
// SourceLocation //
|
||||||
@ -1,4 +1,4 @@ |
|||||||
#include "source_range.h" |
#include "source_range.hpp" |
||||||
|
|
||||||
clangmm::SourceRange::SourceRange(const clangmm::SourceLocation &start, const clangmm::SourceLocation &end) { |
clangmm::SourceRange::SourceRange(const clangmm::SourceLocation &start, const clangmm::SourceLocation &end) { |
||||||
cx_range = clang_getRange(start.cx_location, end.cx_location); |
cx_range = clang_getRange(start.cx_location, end.cx_location); |
||||||
@ -1,6 +1,6 @@ |
|||||||
#ifndef SOURCERANGE_H_ |
#ifndef SOURCERANGE_H_ |
||||||
#define SOURCERANGE_H_ |
#define SOURCERANGE_H_ |
||||||
#include "source_location.h" |
#include "source_location.hpp" |
||||||
#include <clang-c/Index.h> |
#include <clang-c/Index.h> |
||||||
#include <string> |
#include <string> |
||||||
#include <utility> |
#include <utility> |
||||||
@ -1,5 +1,5 @@ |
|||||||
#include "token.h" |
#include "token.hpp" |
||||||
#include "utility.h" |
#include "utility.hpp" |
||||||
|
|
||||||
// // // // //
|
// // // // //
|
||||||
// Token //
|
// Token //
|
||||||
@ -1,8 +1,8 @@ |
|||||||
#ifndef TOKEN_H_ |
#ifndef TOKEN_H_ |
||||||
#define TOKEN_H_ |
#define TOKEN_H_ |
||||||
#include "cursor.h" |
#include "cursor.hpp" |
||||||
#include "source_location.h" |
#include "source_location.hpp" |
||||||
#include "source_range.h" |
#include "source_range.hpp" |
||||||
#include <clang-c/Index.h> |
#include <clang-c/Index.h> |
||||||
#include <string> |
#include <string> |
||||||
|
|
||||||
@ -1,5 +1,5 @@ |
|||||||
#include "tokens.h" |
#include "tokens.hpp" |
||||||
#include "utility.h" |
#include "utility.hpp" |
||||||
#include <cstring> |
#include <cstring> |
||||||
#include <map> |
#include <map> |
||||||
#include <unordered_set> |
#include <unordered_set> |
||||||
@ -1,7 +1,7 @@ |
|||||||
#ifndef TOKENS_H_ |
#ifndef TOKENS_H_ |
||||||
#define TOKENS_H_ |
#define TOKENS_H_ |
||||||
#include "source_range.h" |
#include "source_range.hpp" |
||||||
#include "token.h" |
#include "token.hpp" |
||||||
#include <clang-c/Index.h> |
#include <clang-c/Index.h> |
||||||
#include <memory> |
#include <memory> |
||||||
#include <unordered_set> |
#include <unordered_set> |
||||||
@ -1,7 +1,7 @@ |
|||||||
#include "translation_unit.h" |
#include "translation_unit.hpp" |
||||||
#include "source_location.h" |
#include "source_location.hpp" |
||||||
#include "tokens.h" |
#include "tokens.hpp" |
||||||
#include "utility.h" |
#include "utility.hpp" |
||||||
#include <fstream> |
#include <fstream> |
||||||
#include <sstream> |
#include <sstream> |
||||||
|
|
||||||
@ -1,10 +1,10 @@ |
|||||||
#ifndef TRANSLATIONUNIT_H_ |
#ifndef TRANSLATIONUNIT_H_ |
||||||
#define TRANSLATIONUNIT_H_ |
#define TRANSLATIONUNIT_H_ |
||||||
#include "code_complete_results.h" |
#include "code_complete_results.hpp" |
||||||
#include "cursor.h" |
#include "cursor.hpp" |
||||||
#include "diagnostic.h" |
#include "diagnostic.hpp" |
||||||
#include "index.h" |
#include "index.hpp" |
||||||
#include "tokens.h" |
#include "tokens.hpp" |
||||||
#include <clang-c/Index.h> |
#include <clang-c/Index.h> |
||||||
#include <map> |
#include <map> |
||||||
#include <memory> |
#include <memory> |
||||||
@ -1,4 +1,4 @@ |
|||||||
#include "utility.h" |
#include "utility.hpp" |
||||||
#include <regex> |
#include <regex> |
||||||
|
|
||||||
std::string clangmm::to_string(CXString cx_string) { |
std::string clangmm::to_string(CXString cx_string) { |
||||||
@ -1,29 +1,29 @@ |
|||||||
add_definitions(-DLIBCLANGMM_TESTS_PATH="${CMAKE_CURRENT_SOURCE_DIR}") |
add_definitions(-DLIBCLANGMM_TESTS_PATH="${CMAKE_CURRENT_SOURCE_DIR}") |
||||||
|
|
||||||
add_executable(code_complete_results_test code_complete_results_test.cc) |
add_executable(code_complete_results_test code_complete_results_test.cpp) |
||||||
target_link_libraries(code_complete_results_test clangmm) |
target_link_libraries(code_complete_results_test clangmm) |
||||||
add_test(code_complete_results_test code_complete_results_test) |
add_test(code_complete_results_test code_complete_results_test) |
||||||
|
|
||||||
add_executable(completion_string_test completion_string_test.cc) |
add_executable(completion_string_test completion_string_test.cpp) |
||||||
target_link_libraries(completion_string_test clangmm) |
target_link_libraries(completion_string_test clangmm) |
||||||
add_test(completion_string_test completion_string_test) |
add_test(completion_string_test completion_string_test) |
||||||
|
|
||||||
add_executable(cursor_test cursor_test.cc) |
add_executable(cursor_test cursor_test.cpp) |
||||||
target_link_libraries(cursor_test clangmm) |
target_link_libraries(cursor_test clangmm) |
||||||
add_test(cursor_test cursor_test) |
add_test(cursor_test cursor_test) |
||||||
|
|
||||||
add_executable(diagnostics_test diagnostics_test.cc) |
add_executable(diagnostics_test diagnostics_test.cpp) |
||||||
target_link_libraries(diagnostics_test clangmm) |
target_link_libraries(diagnostics_test clangmm) |
||||||
add_test(diagnostics_test diagnostics_test) |
add_test(diagnostics_test diagnostics_test) |
||||||
|
|
||||||
add_executable(source_location_test source_location_test.cc) |
add_executable(source_location_test source_location_test.cpp) |
||||||
target_link_libraries(source_location_test clangmm) |
target_link_libraries(source_location_test clangmm) |
||||||
add_test(source_location_test source_location_test) |
add_test(source_location_test source_location_test) |
||||||
|
|
||||||
add_executable(token_test token_test.cc) |
add_executable(token_test token_test.cpp) |
||||||
target_link_libraries(token_test clangmm) |
target_link_libraries(token_test clangmm) |
||||||
add_test(token_test token_test) |
add_test(token_test token_test) |
||||||
|
|
||||||
add_executable(translation_unit_test translation_unit_test.cc) |
add_executable(translation_unit_test translation_unit_test.cpp) |
||||||
target_link_libraries(translation_unit_test clangmm) |
target_link_libraries(translation_unit_test clangmm) |
||||||
add_test(translation_unit_test translation_unit_test) |
add_test(translation_unit_test translation_unit_test) |
||||||
|
|||||||
@ -1,4 +1,4 @@ |
|||||||
#include "clangmm.h" |
#include "clangmm.hpp" |
||||||
#include <cassert> |
#include <cassert> |
||||||
#include <regex> |
#include <regex> |
||||||
#include <string> |
#include <string> |
||||||
@ -1,4 +1,4 @@ |
|||||||
#include "clangmm.h" |
#include "clangmm.hpp" |
||||||
#include <cassert> |
#include <cassert> |
||||||
#include <regex> |
#include <regex> |
||||||
#include <string> |
#include <string> |
||||||
@ -1,4 +1,4 @@ |
|||||||
#include "clangmm.h" |
#include "clangmm.hpp" |
||||||
#include <cassert> |
#include <cassert> |
||||||
#include <regex> |
#include <regex> |
||||||
#include <string> |
#include <string> |
||||||
@ -1,4 +1,4 @@ |
|||||||
#include "clangmm.h" |
#include "clangmm.hpp" |
||||||
#include <cassert> |
#include <cassert> |
||||||
#include <fstream> |
#include <fstream> |
||||||
#include <iostream> |
#include <iostream> |
||||||
@ -1,4 +1,4 @@ |
|||||||
#include "clangmm.h" |
#include "clangmm.hpp" |
||||||
#include <cassert> |
#include <cassert> |
||||||
#include <memory> |
#include <memory> |
||||||
#include <string> |
#include <string> |
||||||
@ -1,4 +1,4 @@ |
|||||||
#include "clangmm.h" |
#include "clangmm.hpp" |
||||||
#include <cassert> |
#include <cassert> |
||||||
#include <string> |
#include <string> |
||||||
|
|
||||||
Loading…
Reference in new issue