Skip to content

Improve formatting, readability and add newlines #551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ parsers:
comment:
layout: "reach, diff, flags, tree, files"
behavior: default
require_changes: no
require_changes: no
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ build:
- cmake
- libclang-13-dev
- llvm-13-dev
- llvm-13-tools
- llvm-13-tools
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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}")

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)
2 changes: 1 addition & 1 deletion docs/FAQ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ languages, which can make your applications more powerful and flexible.

- Installation And Usage Guide-:doc:`Installation and usage <InstallationAndUsage>`

- Tutorials-:doc:`Tutorials <tutorials>`
- Tutorials-:doc:`Tutorials <tutorials>`
2 changes: 1 addition & 1 deletion docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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).
https://llvm.org/OpenProjects.html#clang-template-instantiation-sugar (Visited August 2021).
2 changes: 1 addition & 1 deletion docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/compiler-research/pldi-tutorials-2023/blob/main/examples/p3-ex4/p3-ex4.c>`_.
`Example <https://github.com/compiler-research/pldi-tutorials-2023/blob/main/examples/p3-ex4/p3-ex4.c>`_.
2 changes: 1 addition & 1 deletion include/clang-c/CXCppInterOp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()
// NOLINTEND()
2 changes: 1 addition & 1 deletion lib/Interpreter/CXCppInterOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion lib/Interpreter/exports.ld
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@
-Wl,--export=_ZNK5clang4Type14isFloatingTypeEv
-Wl,--export=_ZNK5clang12FunctionDecl12getNumParamsEv
-Wl,--export=__clang_Interpreter_SetValueNoAlloc
-Wl,--export=__clang_Interpreter_SetValueWithAlloc
-Wl,--export=__clang_Interpreter_SetValueWithAlloc
2 changes: 1 addition & 1 deletion unittests/CppInterOp/EnumReflectionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
2 changes: 1 addition & 1 deletion unittests/CppInterOp/FunctionReflectionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1984,4 +1984,4 @@ TEST(FunctionReflectionTest, UndoTest) {
EXPECT_EQ(ret, 1);
#endif
#endif
}
}
2 changes: 1 addition & 1 deletion unittests/CppInterOp/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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}};
}
}
2 changes: 1 addition & 1 deletion unittests/CppInterOp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
}
Loading