Commit 0e017948 authored by Ole Christian Eidheim's avatar Ole Christian Eidheim
Browse files

Renamed C++ header and source files to use proper C++ file extensions.

parent db8a6d5b
Pipeline #152786533 passed with stage
in 3 minutes and 4 seconds
add_library(clangmm
code_complete_results.cc
compilation_database.cc
compile_command.cc
compile_commands.cc
completion_string.cc
cursor.cc
index.cc
source_location.cc
source_range.cc
token.cc
tokens.cc
translation_unit.cc
diagnostic.cc
utility.cc
code_complete_results.cpp
compilation_database.cpp
compile_command.cpp
compile_commands.cpp
completion_string.cpp
cursor.cpp
index.cpp
source_location.cpp
source_range.cpp
token.cpp
tokens.cpp
translation_unit.cpp
diagnostic.cpp
utility.cpp
)
include_directories(${LIBCLANG_INCLUDE_DIRS})
......@@ -22,21 +22,21 @@ target_include_directories(clangmm PUBLIC ${LIBCLANG_INCLUDE_DIRS} .)
if(${NOT_SUB_PROJECT})
install(TARGETS clangmm ARCHIVE DESTINATION lib)
install(FILES
clangmm.h
code_complete_results.h
compilation_database.h
compile_command.h
compile_commands.h
completion_string.h
cursor.h
index.h
source_location.h
source_range.h
token.h
tokens.h
translation_unit.h
diagnostic.h
utility.h
clangmm.hpp
code_complete_results.hpp
compilation_database.hpp
compile_command.hpp
compile_commands.hpp
completion_string.hpp
cursor.hpp
index.hpp
source_location.hpp
source_range.hpp
token.hpp
tokens.hpp
translation_unit.hpp
diagnostic.hpp
utility.hpp
DESTINATION include/libclangmm
)
endif()
#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_
#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_
#include "code_complete_results.h"
#include "completion_string.h"
#include "utility.h"
#include "code_complete_results.hpp"
#include "completion_string.hpp"
#include "utility.hpp"
clangmm::CodeCompleteResults::CodeCompleteResults(CXTranslationUnit &cx_tu,
const std::string &buffer,
......
#ifndef CODECOMPLETERESULTS_H_
#define CODECOMPLETERESULTS_H_
#include "completion_string.h"
#include "completion_string.hpp"
#include <clang-c/Index.h>
#include <map>
#include <string>
......
#include "compilation_database.h"
#include "compilation_database.hpp"
#include <exception>
clangmm::CompilationDatabase::CompilationDatabase(const std::string &project_path) {
......
#include "compile_command.h"
#include "compile_commands.h"
#include "utility.h"
#include "compile_command.hpp"
#include "compile_commands.hpp"
#include "utility.hpp"
std::vector<std::string> clangmm::CompileCommand::get_arguments() {
unsigned size = clang_CompileCommand_getNumArgs(cx_command);
......
#include "compile_commands.h"
#include "compile_commands.hpp"
clangmm::CompileCommands::CompileCommands(const std::string &filename, CompilationDatabase &db) {
if(!filename.empty())
......
#ifndef COMPILECOMMANDS_H_
#define COMPILECOMMANDS_H_
#include "compilation_database.h"
#include "compile_command.h"
#include "compilation_database.hpp"
#include "compile_command.hpp"
#include <clang-c/CXCompilationDatabase.h>
#include <string>
#include <vector>
......
#include "completion_string.h"
#include "utility.h"
#include "completion_string.hpp"
#include "utility.hpp"
clangmm::CompletionChunk::CompletionChunk(std::string text, CompletionChunkKind kind)
: text(std::move(text)), kind(kind) {}
......
#ifndef COMPLETIONSTRING_H_
#define COMPLETIONSTRING_H_
#include "cursor.h"
#include "cursor.hpp"
#include <clang-c/Index.h>
#include <string>
#include <vector>
......
#include "cursor.h"
#include "utility.h"
#include "cursor.hpp"
#include "utility.hpp"
std::string clangmm::Cursor::Type::get_spelling() const {
return to_string(clang_getTypeSpelling(cx_type));
......
#ifndef CURSOR_H_
#define CURSOR_H_
#include "source_location.h"
#include "source_range.h"
#include "source_location.hpp"
#include "source_range.hpp"
#include <clang-c/Index.h>
#include <string>
#include <unordered_set>
......
#include "diagnostic.h"
#include "source_location.h"
#include "tokens.h"
#include "utility.h"
#include "diagnostic.hpp"
#include "source_location.hpp"
#include "tokens.hpp"
#include "utility.hpp"
clangmm::Diagnostic::Diagnostic(CXTranslationUnit &cx_tu, CXDiagnostic &cx_diagnostic) {
severity = static_cast<Severity>(clang_getDiagnosticSeverity(cx_diagnostic));
......
#ifndef DIAGNOSTIC_H_
#define DIAGNOSTIC_H_
#include "source_range.h"
#include "source_range.hpp"
#include <clang-c/Index.h>
#include <string>
#include <vector>
......
#include "index.h"
#include "index.hpp"
clangmm::Index::Index(int excludeDeclarationsFromPCH, int displayDiagnostics) {
cx_index = clang_createIndex(excludeDeclarationsFromPCH, displayDiagnostics);
......
#include "source_location.h"
#include "utility.h"
#include "source_location.hpp"
#include "utility.hpp"
// // // // // // // //
// SourceLocation //
......
#include "source_range.h"
#include "source_range.hpp"
clangmm::SourceRange::SourceRange(const clangmm::SourceLocation &start, const clangmm::SourceLocation &end) {
cx_range = clang_getRange(start.cx_location, end.cx_location);
......
#ifndef SOURCERANGE_H_
#define SOURCERANGE_H_
#include "source_location.h"
#include "source_location.hpp"
#include <clang-c/Index.h>
#include <string>
#include <utility>
......
#include "token.h"
#include "utility.h"
#include "token.hpp"
#include "utility.hpp"
// // // // //
// Token //
......
#ifndef TOKEN_H_
#define TOKEN_H_
#include "cursor.h"
#include "source_location.h"
#include "source_range.h"
#include "cursor.hpp"
#include "source_location.hpp"
#include "source_range.hpp"
#include <clang-c/Index.h>
#include <string>
......
#include "tokens.h"
#include "utility.h"
#include "tokens.hpp"
#include "utility.hpp"
#include <cstring>
#include <map>
#include <unordered_set>
......
#ifndef TOKENS_H_
#define TOKENS_H_
#include "source_range.h"
#include "token.h"
#include "source_range.hpp"
#include "token.hpp"
#include <clang-c/Index.h>
#include <memory>
#include <unordered_set>
......
#include "translation_unit.h"
#include "source_location.h"
#include "tokens.h"
#include "utility.h"
#include "translation_unit.hpp"
#include "source_location.hpp"
#include "tokens.hpp"
#include "utility.hpp"
#include <fstream>
#include <sstream>
......
#ifndef TRANSLATIONUNIT_H_
#define TRANSLATIONUNIT_H_
#include "code_complete_results.h"
#include "cursor.h"
#include "diagnostic.h"
#include "index.h"
#include "tokens.h"
#include "code_complete_results.hpp"
#include "cursor.hpp"
#include "diagnostic.hpp"
#include "index.hpp"
#include "tokens.hpp"
#include <clang-c/Index.h>
#include <map>
#include <memory>
......
#include "utility.h"
#include "utility.hpp"
#include <regex>
std::string clangmm::to_string(CXString cx_string) {
......
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)
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)
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)
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)
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)
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)
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)
add_test(translation_unit_test translation_unit_test)
#include "clangmm.h"
#include "clangmm.hpp"
#include <cassert>
#include <regex>
#include <string>
......
#include "clangmm.h"
#include "clangmm.hpp"
#include <cassert>
#include <regex>
#include <string>
......
#include "clangmm.h"
#include "clangmm.hpp"
#include <cassert>
#include <regex>
#include <string>
......
#include "clangmm.h"
#include "clangmm.hpp"
#include <cassert>
#include <fstream>
#include <iostream>
......
#include "clangmm.h"
#include "clangmm.hpp"
#include <cassert>
#include <memory>
#include <string>
......
#include "clangmm.h"
#include "clangmm.hpp"
#include <cassert>
#include <string>
......
#include "clangmm.h"
#include "clangmm.hpp"
#include <cassert>
#include <map>
#include <string>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment