From fc145073bdc55735f857889bc0fe10b205c1af26 Mon Sep 17 00:00:00 2001 From: Aleks Date: Mon, 27 Apr 2026 15:26:41 +0200 Subject: [PATCH 1/3] chore(cmake): bump c# lang version to 10 --- src/CppAst/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CppAst/CMakeLists.txt b/src/CppAst/CMakeLists.txt index 4403333..4e8df03 100644 --- a/src/CppAst/CMakeLists.txt +++ b/src/CppAst/CMakeLists.txt @@ -1,6 +1,6 @@ file(GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cs) -set(CMAKE_CSharp_FLAGS "${CMAKE_CSharp_FLAGS} /langversion:7.3") +set(CMAKE_CSharp_FLAGS "${CMAKE_CSharp_FLAGS} /langversion:10") add_library(CppAst SHARED ${SOURCE_FILES}) From 17840a7e9024c9a4600004b43968e79025a37865 Mon Sep 17 00:00:00 2001 From: Aleks Date: Mon, 27 Apr 2026 15:44:11 +0200 Subject: [PATCH 2/3] fix: exception raised when resolving template specialization for already resolved types --- src/CppAst/CppContainerList.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/CppAst/CppContainerList.cs b/src/CppAst/CppContainerList.cs index aa3bb3a..e8456ba 100644 --- a/src/CppAst/CppContainerList.cs +++ b/src/CppAst/CppContainerList.cs @@ -58,7 +58,17 @@ public void AddRange(IEnumerable collection) { foreach (var element in collection) { - Add(element); + // Check if given element is already resolved + if (element.Parent == null) + { + // If not, create one + Add(element); + } + else + { + // Otherwise, just reference it + _elements.Add(element); + } } } } From a3a1f8adc91c54f6dd79f61ef409904948e32ff0 Mon Sep 17 00:00:00 2001 From: Aleks Date: Mon, 27 Apr 2026 21:10:25 +0200 Subject: [PATCH 3/3] chore(cmake): bump ClangSharp version to 20.1.2 --- src/CppAst/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CppAst/CMakeLists.txt b/src/CppAst/CMakeLists.txt index 4e8df03..82044f0 100644 --- a/src/CppAst/CMakeLists.txt +++ b/src/CppAst/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_CSharp_FLAGS "${CMAKE_CSharp_FLAGS} /langversion:10") add_library(CppAst SHARED ${SOURCE_FILES}) set_target_properties(CppAst PROPERTIES - VS_PACKAGE_REFERENCES "ClangSharp_17.0.1;Irony_1.2.0" + VS_PACKAGE_REFERENCES "ClangSharp_20.1.2;Irony_1.2.0" ) target_compile_options(CppAst PUBLIC "/unsafe") \ No newline at end of file