From 850bdd0d101ec3618e84b7543f20c738e763cb6a Mon Sep 17 00:00:00 2001 From: Aaron Jomy Date: Wed, 23 Apr 2025 16:12:26 +0200 Subject: [PATCH] New-line terminate somefiles and improve readability --- .codecov.yml | 2 +- .readthedocs.yaml | 2 +- CMakeLists.txt | 10 ++++------ docs/CMakeLists.txt | 2 +- docs/FAQ.rst | 2 +- docs/reference.rst | 2 +- docs/tutorials.rst | 2 +- include/clang-c/CXCppInterOp.h | 2 +- lib/Interpreter/CXCppInterOp.cpp | 2 +- lib/Interpreter/exports.ld | 2 +- unittests/CppInterOp/EnumReflectionTest.cpp | 2 +- unittests/CppInterOp/FunctionReflectionTest.cpp | 2 +- unittests/CppInterOp/Utils.cpp | 2 +- unittests/CppInterOp/main.cpp | 2 +- 14 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 3216e14e2..b81a49380 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -22,4 +22,4 @@ parsers: comment: layout: "reach, diff, flags, tree, files" behavior: default - require_changes: no \ No newline at end of file + require_changes: no diff --git a/.readthedocs.yaml b/.readthedocs.yaml index f51372140..33799521c 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -13,4 +13,4 @@ build: - cmake - libclang-13-dev - llvm-13-dev - - llvm-13-tools \ No newline at end of file + - llvm-13-tools diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cf370790..240a02d07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -154,7 +154,7 @@ include(GNUInstallDirs) message(STATUS "Found supported version: LLVM ${LLVM_PACKAGE_VERSION}") message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") - ## Find supported LLD only while building for webassembly against emscripten +## Find supported LLD only while building for webassembly against emscripten if(EMSCRIPTEN) if (DEFINED LLD_VERSION) @@ -236,14 +236,14 @@ endif() set (CMAKE_CXX_STANDARD 17) endif() if (CMAKE_CXX_STANDARD LESS 17) - message(fatal "LLVM/CppInterOp requires c++17 or later") + message(fatal "LLVM/CppInterOp requires C++17 or later") endif() elseif (CLANG_VERSION_MAJOR GREATER_EQUAL 13) if (NOT CMAKE_CXX_STANDARD) set (CMAKE_CXX_STANDARD 14) endif() if (CMAKE_CXX_STANDARD LESS 14) - message(fatal "LLVM/CppInterOp requires c++14 or later") + message(fatal "LLVM/CppInterOp requires C++14 or later") endif() endif() @@ -274,8 +274,6 @@ endif() # For consistency we should set it to the correct value. set(LLVM_CONFIG_HAS_RTTI NO CACHE BOOL "" FORCE) - ## Init - # In case this was a path to a build folder of llvm still try to find AddLLVM list(APPEND CMAKE_MODULE_PATH "${LLVM_DIR}") @@ -383,7 +381,7 @@ include_directories(BEFORE SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/include ) -#Removes flag due to issue with Google test download when LLVM_ENABLE_WERROR=On +# Removes flag due to issue with Google test download when LLVM_ENABLE_WERROR=On string(REPLACE "-Wcovered-switch-default" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") file(STRINGS "VERSION" CPPINTEROP_VERSION) diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 25d24d827..9efcc0343 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -28,4 +28,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/conf.py create_sphinx_target( SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} TARGET_NAME sphinx-cppinterop -) \ No newline at end of file +) diff --git a/docs/FAQ.rst b/docs/FAQ.rst index 8a1bd4528..54a5de03f 100644 --- a/docs/FAQ.rst +++ b/docs/FAQ.rst @@ -21,4 +21,4 @@ languages, which can make your applications more powerful and flexible. - Installation And Usage Guide-:doc:`Installation and usage ` -- Tutorials-:doc:`Tutorials ` \ No newline at end of file +- Tutorials-:doc:`Tutorials ` diff --git a/docs/reference.rst b/docs/reference.rst index 8e82a6b81..7c3675408 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -36,4 +36,4 @@ https: //www.boost.org/doc/libs/1_65_1/libs/python/doc/html/reference/index.html https://bitbucket.org/wlav/cppyy/issues/369/template-instantiation-not-happening-in (Visited August 2021). [14] Extend clang AST to provide information for the type as written in template instantiations, - https://llvm.org/OpenProjects.html#clang-template-instantiation-sugar (Visited August 2021). \ No newline at end of file + https://llvm.org/OpenProjects.html#clang-template-instantiation-sugar (Visited August 2021). diff --git a/docs/tutorials.rst b/docs/tutorials.rst index 9f636f26b..9e2cfd649 100644 --- a/docs/tutorials.rst +++ b/docs/tutorials.rst @@ -301,4 +301,4 @@ be under the extern C for the compiler to know the C++ code within. The complete example can found below: -`Example `_. \ No newline at end of file +`Example `_. diff --git a/include/clang-c/CXCppInterOp.h b/include/clang-c/CXCppInterOp.h index f885e19c5..d17f42c01 100644 --- a/include/clang-c/CXCppInterOp.h +++ b/include/clang-c/CXCppInterOp.h @@ -370,4 +370,4 @@ CINDEX_LINKAGE void clang_destruct(CXObject This, CXScope S, bool withFree); LLVM_CLANG_C_EXTERN_C_END #endif // LLVM_CLANG_C_CXCPPINTEROP_H - // NOLINTEND() \ No newline at end of file + // NOLINTEND() diff --git a/lib/Interpreter/CXCppInterOp.cpp b/lib/Interpreter/CXCppInterOp.cpp index 031096c91..06bb3883a 100644 --- a/lib/Interpreter/CXCppInterOp.cpp +++ b/lib/Interpreter/CXCppInterOp.cpp @@ -619,4 +619,4 @@ void Destruct(compat::Interpreter& interp, TCppObject_t This, void clang_destruct(CXObject This, CXScope S, bool withFree) { Cpp::Destruct(*getInterpreter(S), This, getDecl(S), withFree); -} \ No newline at end of file +} diff --git a/lib/Interpreter/exports.ld b/lib/Interpreter/exports.ld index 49b7b0d83..23bd5821e 100644 --- a/lib/Interpreter/exports.ld +++ b/lib/Interpreter/exports.ld @@ -50,4 +50,4 @@ -Wl,--export=_ZNK5clang4Type14isFloatingTypeEv -Wl,--export=_ZNK5clang12FunctionDecl12getNumParamsEv -Wl,--export=__clang_Interpreter_SetValueNoAlloc --Wl,--export=__clang_Interpreter_SetValueWithAlloc \ No newline at end of file +-Wl,--export=__clang_Interpreter_SetValueWithAlloc diff --git a/unittests/CppInterOp/EnumReflectionTest.cpp b/unittests/CppInterOp/EnumReflectionTest.cpp index a8fc1a028..1bf1adfba 100644 --- a/unittests/CppInterOp/EnumReflectionTest.cpp +++ b/unittests/CppInterOp/EnumReflectionTest.cpp @@ -357,4 +357,4 @@ TEST(EnumReflectionTest, GetEnums) { EXPECT_TRUE(std::find(enumNames2.begin(), enumNames2.end(), "Months") != enumNames2.end()); EXPECT_TRUE(std::find(enumNames3.begin(), enumNames3.end(), "Color") != enumNames3.end()); EXPECT_TRUE(enumNames4.empty()); -} \ No newline at end of file +} diff --git a/unittests/CppInterOp/FunctionReflectionTest.cpp b/unittests/CppInterOp/FunctionReflectionTest.cpp index 5d926339e..9353472e9 100644 --- a/unittests/CppInterOp/FunctionReflectionTest.cpp +++ b/unittests/CppInterOp/FunctionReflectionTest.cpp @@ -1984,4 +1984,4 @@ TEST(FunctionReflectionTest, UndoTest) { EXPECT_EQ(ret, 1); #endif #endif - } \ No newline at end of file + } diff --git a/unittests/CppInterOp/Utils.cpp b/unittests/CppInterOp/Utils.cpp index 4daf18c35..66a1e9643 100644 --- a/unittests/CppInterOp/Utils.cpp +++ b/unittests/CppInterOp/Utils.cpp @@ -71,4 +71,4 @@ void dispose_string(CXString string) { CXScope make_scope(const clang::Decl* D, const CXInterpreter I) { return {CXCursor_UnexposedDecl, 0, {D, nullptr, I}}; -} \ No newline at end of file +} diff --git a/unittests/CppInterOp/main.cpp b/unittests/CppInterOp/main.cpp index 09799f80a..697a9d70c 100644 --- a/unittests/CppInterOp/main.cpp +++ b/unittests/CppInterOp/main.cpp @@ -3,4 +3,4 @@ int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); -} \ No newline at end of file +}