From 77ffcefd90f4686e8ade0816fd966f3d5aa80fa9 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Wed, 4 Nov 2026 15:17:01 -0800 Subject: [PATCH 1/2] Update managed bindings to LLVM 23.1.5 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- Directory.Build.props | 2 +- Directory.Packages.props | 4 ++-- README.md | 4 ++++ sources/ClangSharp.Interop/clang.cs | 2 +- .../clang/CXAvailabilityKind.cs | 2 +- .../clang/CXBinaryOperatorKind.cs | 2 +- .../ClangSharp.Interop/clang/CXCallingConv.cs | 2 +- .../clang/CXChildVisitResult.cs | 2 +- sources/ClangSharp.Interop/clang/CXChoice.cs | 2 +- .../clang/CXCodeCompleteResults.cs | 2 +- .../clang/CXCodeComplete_Flags.cs | 2 +- sources/ClangSharp.Interop/clang/CXComment.cs | 2 +- .../clang/CXCommentInlineCommandRenderKind.cs | 2 +- .../ClangSharp.Interop/clang/CXCommentKind.cs | 2 +- .../clang/CXCommentParamPassDirection.cs | 2 +- .../clang/CXCompilationDatabase_Error.cs | 2 +- .../clang/CXCompletionChunkKind.cs | 2 +- .../clang/CXCompletionContext.cs | 2 +- .../clang/CXCompletionResult.cs | 2 +- sources/ClangSharp.Interop/clang/CXCursor.cs | 2 +- .../clang/CXCursorAndRangeVisitor.cs | 2 +- .../ClangSharp.Interop/clang/CXCursorKind.cs | 3 ++- .../CXCursor_ExceptionSpecificationKind.cs | 2 +- .../clang/CXDiagnosticDisplayOptions.cs | 2 +- .../clang/CXDiagnosticSeverity.cs | 2 +- sources/ClangSharp.Interop/clang/CXErrorCode.cs | 2 +- .../clang/CXEvalResultKind.cs | 2 +- .../ClangSharp.Interop/clang/CXFileUniqueID.cs | 2 +- .../clang/CXGlobalOptFlags.cs | 2 +- .../ClangSharp.Interop/clang/CXIdxAttrInfo.cs | 2 +- .../ClangSharp.Interop/clang/CXIdxAttrKind.cs | 2 +- .../clang/CXIdxBaseClassInfo.cs | 2 +- .../clang/CXIdxCXXClassDeclInfo.cs | 2 +- .../clang/CXIdxContainerInfo.cs | 2 +- .../ClangSharp.Interop/clang/CXIdxDeclInfo.cs | 2 +- .../clang/CXIdxDeclInfoFlags.cs | 2 +- .../clang/CXIdxEntityCXXTemplateKind.cs | 2 +- .../ClangSharp.Interop/clang/CXIdxEntityInfo.cs | 2 +- .../ClangSharp.Interop/clang/CXIdxEntityKind.cs | 2 +- .../clang/CXIdxEntityLanguage.cs | 2 +- .../clang/CXIdxEntityRefInfo.cs | 2 +- .../clang/CXIdxEntityRefKind.cs | 2 +- .../clang/CXIdxIBOutletCollectionAttrInfo.cs | 2 +- .../clang/CXIdxImportedASTFileInfo.cs | 2 +- .../clang/CXIdxIncludedFileInfo.cs | 2 +- sources/ClangSharp.Interop/clang/CXIdxLoc.cs | 2 +- .../clang/CXIdxObjCCategoryDeclInfo.cs | 2 +- .../clang/CXIdxObjCContainerDeclInfo.cs | 2 +- .../clang/CXIdxObjCContainerKind.cs | 2 +- .../clang/CXIdxObjCInterfaceDeclInfo.cs | 2 +- .../clang/CXIdxObjCPropertyDeclInfo.cs | 2 +- .../clang/CXIdxObjCProtocolRefInfo.cs | 2 +- .../clang/CXIdxObjCProtocolRefListInfo.cs | 2 +- .../ClangSharp.Interop/clang/CXIndexOptFlags.cs | 2 +- .../ClangSharp.Interop/clang/CXIndexOptions.cs | 2 +- .../ClangSharp.Interop/clang/CXLanguageKind.cs | 2 +- .../ClangSharp.Interop/clang/CXLinkageKind.cs | 2 +- .../clang/CXLoadDiag_Error.cs | 2 +- .../ClangSharp.Interop/clang/CXNameRefFlags.cs | 2 +- .../clang/CXObjCDeclQualifierKind.cs | 2 +- .../clang/CXObjCPropertyAttrKind.cs | 2 +- .../clang/CXPlatformAvailability.cs | 2 +- .../clang/CXPrintingPolicyProperty.cs | 2 +- .../clang/CXRefQualifierKind.cs | 2 +- .../ClangSharp.Interop/clang/CXReparse_Flags.cs | 2 +- sources/ClangSharp.Interop/clang/CXResult.cs | 2 +- sources/ClangSharp.Interop/clang/CXSaveError.cs | 2 +- .../clang/CXSaveTranslationUnit_Flags.cs | 2 +- .../clang/CXSourceLocation.cs | 2 +- .../ClangSharp.Interop/clang/CXSourceRange.cs | 2 +- .../clang/CXSourceRangeList.cs | 2 +- sources/ClangSharp.Interop/clang/CXString.cs | 2 +- sources/ClangSharp.Interop/clang/CXStringSet.cs | 2 +- .../ClangSharp.Interop/clang/CXSymbolRole.cs | 2 +- sources/ClangSharp.Interop/clang/CXTLSKind.cs | 2 +- .../clang/CXTUResourceUsage.cs | 2 +- .../clang/CXTUResourceUsageEntry.cs | 2 +- .../clang/CXTUResourceUsageKind.cs | 2 +- .../clang/CXTemplateArgumentKind.cs | 2 +- sources/ClangSharp.Interop/clang/CXToken.cs | 2 +- sources/ClangSharp.Interop/clang/CXTokenKind.cs | 2 +- .../clang/CXTranslationUnit_Flags.cs | 2 +- sources/ClangSharp.Interop/clang/CXType.cs | 2 +- sources/ClangSharp.Interop/clang/CXTypeKind.cs | 3 ++- .../clang/CXTypeLayoutError.cs | 2 +- .../clang/CXTypeNullabilityKind.cs | 2 +- .../clang/CXUnaryOperatorKind.cs | 3 ++- .../ClangSharp.Interop/clang/CXUnsavedFile.cs | 2 +- sources/ClangSharp.Interop/clang/CXVersion.cs | 2 +- .../clang/CXVisibilityKind.cs | 2 +- .../ClangSharp.Interop/clang/CXVisitorResult.cs | 2 +- .../clang/CX_BinaryOperatorKind.cs | 2 +- .../clang/CX_CXXAccessSpecifier.cs | 2 +- .../ClangSharp.Interop/clang/CX_StorageClass.cs | 2 +- .../clang/IndexerCallbacks.cs | 2 +- sources/ClangSharp.Interop/clang/clang.cs | 8 +++++++- .../clangsharp/CX_AtomicOperatorKind.cs | 8 ++++++++ .../clangsharp/CX_AttrKind.cs | 13 +++++++++++++ .../clangsharp/CX_DeclKind.cs | 2 ++ .../clangsharp/CX_StmtClass.cs | 17 +++++++++++++---- .../clangsharp/CX_TypeClass.cs | 1 + .../clangsharp/CX_TypeTrait.cs | 3 ++- .../ClangSharp/Cursors/Exprs/StringLiteral.cs | 6 +++--- .../ClangSharpPInvokeGenerator.csproj | 2 +- .../Properties/GenerateClang-LICENSE.txt | 2 +- .../Properties/GenerateClang.rsp | 7 +++++-- .../Properties/GenerateClangSharp.rsp | 8 ++++++-- .../Properties/launchSettings.json | 2 ++ .../Baseline/BaselineTest.cs | 12 ------------ ...buteWithHelperTypes.CSharp.Latest.Windows.cs | 2 +- ...AttributeInTypeMode.CSharp.Latest.Windows.cs | 6 +++--- ...egateInTypeMode.CSharp.Compatible.Windows.cs | 8 ++++---- ...mblyWithHelperTypes.CSharp.Latest.Windows.cs | 6 +++--- ...tedAfterMethodClass.CSharp.Latest.Windows.cs | 2 +- ...thodClassFileScoped.CSharp.Latest.Windows.cs | 2 +- ...FileScopedNamespace.CSharp.Latest.Windows.cs | 2 +- ...edInSharedNamespace.CSharp.Latest.Windows.cs | 2 +- ...eneratesValidHelper.CSharp.Latest.Windows.cs | 2 +- .../Baseline/StructDeclarationTest.cs | 4 ---- .../CursorTests/DeclTest.cs | 8 -------- tests/ClangSharp.UnitTests/ExprTest.cs | 17 +++++++++++++++++ .../ClangSharp.UnitTests/TranslationUnitTest.cs | 13 ------------- tests/ClangSharp.UnitTests/TypeTest.cs | 4 ---- 123 files changed, 199 insertions(+), 167 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index d5011d0d7..415001755 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -47,7 +47,7 @@ 17.0.0 ClangSharp ClangSharp - 22.1.8.0 + 23.1.5.0 rc1 pr diff --git a/Directory.Packages.props b/Directory.Packages.props index 4ce0e00c2..533b0b352 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -12,8 +12,8 @@ - - + + diff --git a/README.md b/README.md index 3a5270113..5570f9d19 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,10 @@ See [LICENSE.md](LICENSE.md) in the repository root for more information. ClangSharp requires the [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) and can be built simply with `dotnet build -c Release`. +The managed libraries and generator target LLVM 23.1.5 and use the matching `libClang` 23.1.5 and `libClangSharp` 23.1.5.0 runtime packages. + +To regenerate the managed interop bindings, run the generator from the repository root with `sources/ClangSharpPInvokeGenerator/Properties/GenerateClang.rsp` or `GenerateClangSharp.rsp`. Use the matching LLVM release's headers (including its generated headers) as `--include-directory`, and set `--file-directory` to that include directory for libClang or to `sources` for libClangSharp. For libClangSharp, also include the native build directory containing `ClangSharp_export.h`. The response files write to `sources/ClangSharp.Interop/clang` and `sources/ClangSharp.Interop/clangsharp`, respectively. + You can reproduce what the CI environment does by running `./scripts/cibuild.cmd` on Windows or `./scripts.cibuild.sh` on Unix. This will download the required .NET SDK locally and use that to build the repo; it will also run through all available actions in the appropriate order. diff --git a/sources/ClangSharp.Interop/clang.cs b/sources/ClangSharp.Interop/clang.cs index 9a0ecb5db..df5685b79 100644 --- a/sources/ClangSharp.Interop/clang.cs +++ b/sources/ClangSharp.Interop/clang.cs @@ -14,7 +14,7 @@ public static unsafe partial class @clang { public static event DllImportResolver? ResolveLibrary; - public const int MajorVersion = 22; + public const int MajorVersion = 23; public const int MinorVersion = 1; static @clang() diff --git a/sources/ClangSharp.Interop/clang/CXAvailabilityKind.cs b/sources/ClangSharp.Interop/clang/CXAvailabilityKind.cs index 7e6ca0046..81f591014 100644 --- a/sources/ClangSharp.Interop/clang/CXAvailabilityKind.cs +++ b/sources/ClangSharp.Interop/clang/CXAvailabilityKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXBinaryOperatorKind.cs b/sources/ClangSharp.Interop/clang/CXBinaryOperatorKind.cs index 1f6abbc84..eccbdaa87 100644 --- a/sources/ClangSharp.Interop/clang/CXBinaryOperatorKind.cs +++ b/sources/ClangSharp.Interop/clang/CXBinaryOperatorKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCallingConv.cs b/sources/ClangSharp.Interop/clang/CXCallingConv.cs index 204032adf..8ac8471a0 100644 --- a/sources/ClangSharp.Interop/clang/CXCallingConv.cs +++ b/sources/ClangSharp.Interop/clang/CXCallingConv.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXChildVisitResult.cs b/sources/ClangSharp.Interop/clang/CXChildVisitResult.cs index 5b4bf052c..c4b1eea77 100644 --- a/sources/ClangSharp.Interop/clang/CXChildVisitResult.cs +++ b/sources/ClangSharp.Interop/clang/CXChildVisitResult.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXChoice.cs b/sources/ClangSharp.Interop/clang/CXChoice.cs index 123793a5c..3f3f546f3 100644 --- a/sources/ClangSharp.Interop/clang/CXChoice.cs +++ b/sources/ClangSharp.Interop/clang/CXChoice.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCodeCompleteResults.cs b/sources/ClangSharp.Interop/clang/CXCodeCompleteResults.cs index 3ff72e1d8..48c9c22f8 100644 --- a/sources/ClangSharp.Interop/clang/CXCodeCompleteResults.cs +++ b/sources/ClangSharp.Interop/clang/CXCodeCompleteResults.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCodeComplete_Flags.cs b/sources/ClangSharp.Interop/clang/CXCodeComplete_Flags.cs index 5409e1cee..178f9d5f2 100644 --- a/sources/ClangSharp.Interop/clang/CXCodeComplete_Flags.cs +++ b/sources/ClangSharp.Interop/clang/CXCodeComplete_Flags.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXComment.cs b/sources/ClangSharp.Interop/clang/CXComment.cs index 5bfcbe814..25d90013a 100644 --- a/sources/ClangSharp.Interop/clang/CXComment.cs +++ b/sources/ClangSharp.Interop/clang/CXComment.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCommentInlineCommandRenderKind.cs b/sources/ClangSharp.Interop/clang/CXCommentInlineCommandRenderKind.cs index 9317e0150..4f9539e42 100644 --- a/sources/ClangSharp.Interop/clang/CXCommentInlineCommandRenderKind.cs +++ b/sources/ClangSharp.Interop/clang/CXCommentInlineCommandRenderKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCommentKind.cs b/sources/ClangSharp.Interop/clang/CXCommentKind.cs index 003bdab82..754fcaaab 100644 --- a/sources/ClangSharp.Interop/clang/CXCommentKind.cs +++ b/sources/ClangSharp.Interop/clang/CXCommentKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCommentParamPassDirection.cs b/sources/ClangSharp.Interop/clang/CXCommentParamPassDirection.cs index 1a4a3ac2a..70b6ce8ca 100644 --- a/sources/ClangSharp.Interop/clang/CXCommentParamPassDirection.cs +++ b/sources/ClangSharp.Interop/clang/CXCommentParamPassDirection.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCompilationDatabase_Error.cs b/sources/ClangSharp.Interop/clang/CXCompilationDatabase_Error.cs index fa2619158..0bb0f60de 100644 --- a/sources/ClangSharp.Interop/clang/CXCompilationDatabase_Error.cs +++ b/sources/ClangSharp.Interop/clang/CXCompilationDatabase_Error.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCompletionChunkKind.cs b/sources/ClangSharp.Interop/clang/CXCompletionChunkKind.cs index 6b60ed117..8ea710990 100644 --- a/sources/ClangSharp.Interop/clang/CXCompletionChunkKind.cs +++ b/sources/ClangSharp.Interop/clang/CXCompletionChunkKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCompletionContext.cs b/sources/ClangSharp.Interop/clang/CXCompletionContext.cs index 98d82ea99..f4a6db33e 100644 --- a/sources/ClangSharp.Interop/clang/CXCompletionContext.cs +++ b/sources/ClangSharp.Interop/clang/CXCompletionContext.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCompletionResult.cs b/sources/ClangSharp.Interop/clang/CXCompletionResult.cs index 0291d37eb..388034cae 100644 --- a/sources/ClangSharp.Interop/clang/CXCompletionResult.cs +++ b/sources/ClangSharp.Interop/clang/CXCompletionResult.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCursor.cs b/sources/ClangSharp.Interop/clang/CXCursor.cs index 91e190e37..f36e80e93 100644 --- a/sources/ClangSharp.Interop/clang/CXCursor.cs +++ b/sources/ClangSharp.Interop/clang/CXCursor.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. using System.Runtime.CompilerServices; diff --git a/sources/ClangSharp.Interop/clang/CXCursorAndRangeVisitor.cs b/sources/ClangSharp.Interop/clang/CXCursorAndRangeVisitor.cs index 28e7be78c..58925eefa 100644 --- a/sources/ClangSharp.Interop/clang/CXCursorAndRangeVisitor.cs +++ b/sources/ClangSharp.Interop/clang/CXCursorAndRangeVisitor.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXCursorKind.cs b/sources/ClangSharp.Interop/clang/CXCursorKind.cs index fcf80be01..f6070b02f 100644 --- a/sources/ClangSharp.Interop/clang/CXCursorKind.cs +++ b/sources/ClangSharp.Interop/clang/CXCursorKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; @@ -240,6 +240,7 @@ public enum CXCursorKind CXCursor_OMPAssumeDirective = 309, CXCursor_OMPStripeDirective = 310, CXCursor_OMPFuseDirective = 311, + CXCursor_OMPSplitDirective = 312, CXCursor_OpenACCComputeConstruct = 320, CXCursor_OpenACCLoopConstruct = 321, CXCursor_OpenACCCombinedConstruct = 322, diff --git a/sources/ClangSharp.Interop/clang/CXCursor_ExceptionSpecificationKind.cs b/sources/ClangSharp.Interop/clang/CXCursor_ExceptionSpecificationKind.cs index ea3d0988a..7b6b94402 100644 --- a/sources/ClangSharp.Interop/clang/CXCursor_ExceptionSpecificationKind.cs +++ b/sources/ClangSharp.Interop/clang/CXCursor_ExceptionSpecificationKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXDiagnosticDisplayOptions.cs b/sources/ClangSharp.Interop/clang/CXDiagnosticDisplayOptions.cs index 152b10f42..7595069c2 100644 --- a/sources/ClangSharp.Interop/clang/CXDiagnosticDisplayOptions.cs +++ b/sources/ClangSharp.Interop/clang/CXDiagnosticDisplayOptions.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXDiagnosticSeverity.cs b/sources/ClangSharp.Interop/clang/CXDiagnosticSeverity.cs index 9f1fbf351..db1a682f7 100644 --- a/sources/ClangSharp.Interop/clang/CXDiagnosticSeverity.cs +++ b/sources/ClangSharp.Interop/clang/CXDiagnosticSeverity.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXErrorCode.cs b/sources/ClangSharp.Interop/clang/CXErrorCode.cs index a39b187eb..063a614b0 100644 --- a/sources/ClangSharp.Interop/clang/CXErrorCode.cs +++ b/sources/ClangSharp.Interop/clang/CXErrorCode.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXEvalResultKind.cs b/sources/ClangSharp.Interop/clang/CXEvalResultKind.cs index 80b564680..1caa3e524 100644 --- a/sources/ClangSharp.Interop/clang/CXEvalResultKind.cs +++ b/sources/ClangSharp.Interop/clang/CXEvalResultKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXFileUniqueID.cs b/sources/ClangSharp.Interop/clang/CXFileUniqueID.cs index bd893249d..c860d68b3 100644 --- a/sources/ClangSharp.Interop/clang/CXFileUniqueID.cs +++ b/sources/ClangSharp.Interop/clang/CXFileUniqueID.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. using System.Runtime.CompilerServices; diff --git a/sources/ClangSharp.Interop/clang/CXGlobalOptFlags.cs b/sources/ClangSharp.Interop/clang/CXGlobalOptFlags.cs index 05539aefc..cec50aa89 100644 --- a/sources/ClangSharp.Interop/clang/CXGlobalOptFlags.cs +++ b/sources/ClangSharp.Interop/clang/CXGlobalOptFlags.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxAttrInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxAttrInfo.cs index 990396130..9079638a8 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxAttrInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxAttrInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxAttrKind.cs b/sources/ClangSharp.Interop/clang/CXIdxAttrKind.cs index 221357622..e69edf4c4 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxAttrKind.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxAttrKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxBaseClassInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxBaseClassInfo.cs index 601d9c4df..b01e856cd 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxBaseClassInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxBaseClassInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxCXXClassDeclInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxCXXClassDeclInfo.cs index 6cf671e66..4276b31e0 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxCXXClassDeclInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxCXXClassDeclInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxContainerInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxContainerInfo.cs index 4cfce9be1..46b2a9ec4 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxContainerInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxContainerInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxDeclInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxDeclInfo.cs index cceec81bb..a6f919e3c 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxDeclInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxDeclInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxDeclInfoFlags.cs b/sources/ClangSharp.Interop/clang/CXIdxDeclInfoFlags.cs index ddbac4964..b8e74b17a 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxDeclInfoFlags.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxDeclInfoFlags.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxEntityCXXTemplateKind.cs b/sources/ClangSharp.Interop/clang/CXIdxEntityCXXTemplateKind.cs index 7995d446f..875b0d5a9 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxEntityCXXTemplateKind.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxEntityCXXTemplateKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxEntityInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxEntityInfo.cs index 0ea4394d1..bb7c336b9 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxEntityInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxEntityInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxEntityKind.cs b/sources/ClangSharp.Interop/clang/CXIdxEntityKind.cs index 49b7e06aa..7c9e9051a 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxEntityKind.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxEntityKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxEntityLanguage.cs b/sources/ClangSharp.Interop/clang/CXIdxEntityLanguage.cs index 341dceaf8..89f94a4ac 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxEntityLanguage.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxEntityLanguage.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxEntityRefInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxEntityRefInfo.cs index e06c9d3b3..9139207c9 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxEntityRefInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxEntityRefInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxEntityRefKind.cs b/sources/ClangSharp.Interop/clang/CXIdxEntityRefKind.cs index d644548aa..cfd7107ee 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxEntityRefKind.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxEntityRefKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxIBOutletCollectionAttrInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxIBOutletCollectionAttrInfo.cs index f2b4730a2..0f11722f0 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxIBOutletCollectionAttrInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxIBOutletCollectionAttrInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxImportedASTFileInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxImportedASTFileInfo.cs index 1a90bc5d4..1031cb12e 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxImportedASTFileInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxImportedASTFileInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxIncludedFileInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxIncludedFileInfo.cs index 25936bd86..e68decdbb 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxIncludedFileInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxIncludedFileInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxLoc.cs b/sources/ClangSharp.Interop/clang/CXIdxLoc.cs index d8b483e68..22ffdba0d 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxLoc.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxLoc.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. using System.Runtime.CompilerServices; diff --git a/sources/ClangSharp.Interop/clang/CXIdxObjCCategoryDeclInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxObjCCategoryDeclInfo.cs index 5a2c1cfca..8ad4f9353 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxObjCCategoryDeclInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxObjCCategoryDeclInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxObjCContainerDeclInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxObjCContainerDeclInfo.cs index e83fbe2a8..7315ef30e 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxObjCContainerDeclInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxObjCContainerDeclInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxObjCContainerKind.cs b/sources/ClangSharp.Interop/clang/CXIdxObjCContainerKind.cs index fd1c1d627..2db321c6c 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxObjCContainerKind.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxObjCContainerKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxObjCInterfaceDeclInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxObjCInterfaceDeclInfo.cs index 62aa8c940..8e7b5d8a5 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxObjCInterfaceDeclInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxObjCInterfaceDeclInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxObjCPropertyDeclInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxObjCPropertyDeclInfo.cs index d1fc97de1..d45bf79ea 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxObjCPropertyDeclInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxObjCPropertyDeclInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxObjCProtocolRefInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxObjCProtocolRefInfo.cs index 9c807ecd5..50f4f22c8 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxObjCProtocolRefInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxObjCProtocolRefInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIdxObjCProtocolRefListInfo.cs b/sources/ClangSharp.Interop/clang/CXIdxObjCProtocolRefListInfo.cs index 1dfe12623..970a87840 100644 --- a/sources/ClangSharp.Interop/clang/CXIdxObjCProtocolRefListInfo.cs +++ b/sources/ClangSharp.Interop/clang/CXIdxObjCProtocolRefListInfo.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIndexOptFlags.cs b/sources/ClangSharp.Interop/clang/CXIndexOptFlags.cs index bb8cdd97f..14a93aa55 100644 --- a/sources/ClangSharp.Interop/clang/CXIndexOptFlags.cs +++ b/sources/ClangSharp.Interop/clang/CXIndexOptFlags.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXIndexOptions.cs b/sources/ClangSharp.Interop/clang/CXIndexOptions.cs index e3add3dd4..81f4474c8 100644 --- a/sources/ClangSharp.Interop/clang/CXIndexOptions.cs +++ b/sources/ClangSharp.Interop/clang/CXIndexOptions.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. using System.Runtime.CompilerServices; diff --git a/sources/ClangSharp.Interop/clang/CXLanguageKind.cs b/sources/ClangSharp.Interop/clang/CXLanguageKind.cs index 9a29e82c2..883becb71 100644 --- a/sources/ClangSharp.Interop/clang/CXLanguageKind.cs +++ b/sources/ClangSharp.Interop/clang/CXLanguageKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXLinkageKind.cs b/sources/ClangSharp.Interop/clang/CXLinkageKind.cs index aa129b020..ab9192002 100644 --- a/sources/ClangSharp.Interop/clang/CXLinkageKind.cs +++ b/sources/ClangSharp.Interop/clang/CXLinkageKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXLoadDiag_Error.cs b/sources/ClangSharp.Interop/clang/CXLoadDiag_Error.cs index 5de67c5f6..a384a276e 100644 --- a/sources/ClangSharp.Interop/clang/CXLoadDiag_Error.cs +++ b/sources/ClangSharp.Interop/clang/CXLoadDiag_Error.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXNameRefFlags.cs b/sources/ClangSharp.Interop/clang/CXNameRefFlags.cs index 12ea9f745..f44f33614 100644 --- a/sources/ClangSharp.Interop/clang/CXNameRefFlags.cs +++ b/sources/ClangSharp.Interop/clang/CXNameRefFlags.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXObjCDeclQualifierKind.cs b/sources/ClangSharp.Interop/clang/CXObjCDeclQualifierKind.cs index f56fa7fac..7c4a9d750 100644 --- a/sources/ClangSharp.Interop/clang/CXObjCDeclQualifierKind.cs +++ b/sources/ClangSharp.Interop/clang/CXObjCDeclQualifierKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXObjCPropertyAttrKind.cs b/sources/ClangSharp.Interop/clang/CXObjCPropertyAttrKind.cs index 0bac1b475..89d7b97aa 100644 --- a/sources/ClangSharp.Interop/clang/CXObjCPropertyAttrKind.cs +++ b/sources/ClangSharp.Interop/clang/CXObjCPropertyAttrKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXPlatformAvailability.cs b/sources/ClangSharp.Interop/clang/CXPlatformAvailability.cs index 8b73378d6..11b28320b 100644 --- a/sources/ClangSharp.Interop/clang/CXPlatformAvailability.cs +++ b/sources/ClangSharp.Interop/clang/CXPlatformAvailability.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXPrintingPolicyProperty.cs b/sources/ClangSharp.Interop/clang/CXPrintingPolicyProperty.cs index 6048c5d32..fee4e4da2 100644 --- a/sources/ClangSharp.Interop/clang/CXPrintingPolicyProperty.cs +++ b/sources/ClangSharp.Interop/clang/CXPrintingPolicyProperty.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXRefQualifierKind.cs b/sources/ClangSharp.Interop/clang/CXRefQualifierKind.cs index 0f602c826..fe1b6d9a4 100644 --- a/sources/ClangSharp.Interop/clang/CXRefQualifierKind.cs +++ b/sources/ClangSharp.Interop/clang/CXRefQualifierKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXReparse_Flags.cs b/sources/ClangSharp.Interop/clang/CXReparse_Flags.cs index e17e1399f..d4278b1f2 100644 --- a/sources/ClangSharp.Interop/clang/CXReparse_Flags.cs +++ b/sources/ClangSharp.Interop/clang/CXReparse_Flags.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXResult.cs b/sources/ClangSharp.Interop/clang/CXResult.cs index 92e8b5501..c28ff963e 100644 --- a/sources/ClangSharp.Interop/clang/CXResult.cs +++ b/sources/ClangSharp.Interop/clang/CXResult.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXSaveError.cs b/sources/ClangSharp.Interop/clang/CXSaveError.cs index 130a0d094..ffd7e311f 100644 --- a/sources/ClangSharp.Interop/clang/CXSaveError.cs +++ b/sources/ClangSharp.Interop/clang/CXSaveError.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXSaveTranslationUnit_Flags.cs b/sources/ClangSharp.Interop/clang/CXSaveTranslationUnit_Flags.cs index 47d6d20bc..9087b11b3 100644 --- a/sources/ClangSharp.Interop/clang/CXSaveTranslationUnit_Flags.cs +++ b/sources/ClangSharp.Interop/clang/CXSaveTranslationUnit_Flags.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXSourceLocation.cs b/sources/ClangSharp.Interop/clang/CXSourceLocation.cs index 1b76ccbad..9408ce180 100644 --- a/sources/ClangSharp.Interop/clang/CXSourceLocation.cs +++ b/sources/ClangSharp.Interop/clang/CXSourceLocation.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. using System.Runtime.CompilerServices; diff --git a/sources/ClangSharp.Interop/clang/CXSourceRange.cs b/sources/ClangSharp.Interop/clang/CXSourceRange.cs index b7ed39ce4..e8281ddac 100644 --- a/sources/ClangSharp.Interop/clang/CXSourceRange.cs +++ b/sources/ClangSharp.Interop/clang/CXSourceRange.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. using System.Runtime.CompilerServices; diff --git a/sources/ClangSharp.Interop/clang/CXSourceRangeList.cs b/sources/ClangSharp.Interop/clang/CXSourceRangeList.cs index 5cc6d439c..a5174d61d 100644 --- a/sources/ClangSharp.Interop/clang/CXSourceRangeList.cs +++ b/sources/ClangSharp.Interop/clang/CXSourceRangeList.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXString.cs b/sources/ClangSharp.Interop/clang/CXString.cs index c5419d486..90f2b9ecd 100644 --- a/sources/ClangSharp.Interop/clang/CXString.cs +++ b/sources/ClangSharp.Interop/clang/CXString.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXStringSet.cs b/sources/ClangSharp.Interop/clang/CXStringSet.cs index 19fbc0c2f..35c94b92a 100644 --- a/sources/ClangSharp.Interop/clang/CXStringSet.cs +++ b/sources/ClangSharp.Interop/clang/CXStringSet.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXSymbolRole.cs b/sources/ClangSharp.Interop/clang/CXSymbolRole.cs index c088f1b5e..b9855e99b 100644 --- a/sources/ClangSharp.Interop/clang/CXSymbolRole.cs +++ b/sources/ClangSharp.Interop/clang/CXSymbolRole.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXTLSKind.cs b/sources/ClangSharp.Interop/clang/CXTLSKind.cs index 342cd4dd1..93fe8e13c 100644 --- a/sources/ClangSharp.Interop/clang/CXTLSKind.cs +++ b/sources/ClangSharp.Interop/clang/CXTLSKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXTUResourceUsage.cs b/sources/ClangSharp.Interop/clang/CXTUResourceUsage.cs index 6ab2dc940..82765e8f1 100644 --- a/sources/ClangSharp.Interop/clang/CXTUResourceUsage.cs +++ b/sources/ClangSharp.Interop/clang/CXTUResourceUsage.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXTUResourceUsageEntry.cs b/sources/ClangSharp.Interop/clang/CXTUResourceUsageEntry.cs index 9832f6789..d98248318 100644 --- a/sources/ClangSharp.Interop/clang/CXTUResourceUsageEntry.cs +++ b/sources/ClangSharp.Interop/clang/CXTUResourceUsageEntry.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXTUResourceUsageKind.cs b/sources/ClangSharp.Interop/clang/CXTUResourceUsageKind.cs index 520925df8..04d12fbe9 100644 --- a/sources/ClangSharp.Interop/clang/CXTUResourceUsageKind.cs +++ b/sources/ClangSharp.Interop/clang/CXTUResourceUsageKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXTemplateArgumentKind.cs b/sources/ClangSharp.Interop/clang/CXTemplateArgumentKind.cs index a735394cc..a225eef81 100644 --- a/sources/ClangSharp.Interop/clang/CXTemplateArgumentKind.cs +++ b/sources/ClangSharp.Interop/clang/CXTemplateArgumentKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXToken.cs b/sources/ClangSharp.Interop/clang/CXToken.cs index 919aa78a2..f4c82d1a6 100644 --- a/sources/ClangSharp.Interop/clang/CXToken.cs +++ b/sources/ClangSharp.Interop/clang/CXToken.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. using System.Runtime.CompilerServices; diff --git a/sources/ClangSharp.Interop/clang/CXTokenKind.cs b/sources/ClangSharp.Interop/clang/CXTokenKind.cs index 99a263dda..0e7d15756 100644 --- a/sources/ClangSharp.Interop/clang/CXTokenKind.cs +++ b/sources/ClangSharp.Interop/clang/CXTokenKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXTranslationUnit_Flags.cs b/sources/ClangSharp.Interop/clang/CXTranslationUnit_Flags.cs index f247ac6c3..fe990428f 100644 --- a/sources/ClangSharp.Interop/clang/CXTranslationUnit_Flags.cs +++ b/sources/ClangSharp.Interop/clang/CXTranslationUnit_Flags.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXType.cs b/sources/ClangSharp.Interop/clang/CXType.cs index 4b9e36199..6e2de4719 100644 --- a/sources/ClangSharp.Interop/clang/CXType.cs +++ b/sources/ClangSharp.Interop/clang/CXType.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. using System.Runtime.CompilerServices; diff --git a/sources/ClangSharp.Interop/clang/CXTypeKind.cs b/sources/ClangSharp.Interop/clang/CXTypeKind.cs index 5e4698e54..4c99bb7ee 100644 --- a/sources/ClangSharp.Interop/clang/CXTypeKind.cs +++ b/sources/ClangSharp.Interop/clang/CXTypeKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; @@ -136,4 +136,5 @@ public enum CXTypeKind CXType_HLSLResource = 179, CXType_HLSLAttributedResource = 180, CXType_HLSLInlineSpirv = 181, + CXType_PredefinedSugar = 182, } diff --git a/sources/ClangSharp.Interop/clang/CXTypeLayoutError.cs b/sources/ClangSharp.Interop/clang/CXTypeLayoutError.cs index e6f87d2d3..e3330196d 100644 --- a/sources/ClangSharp.Interop/clang/CXTypeLayoutError.cs +++ b/sources/ClangSharp.Interop/clang/CXTypeLayoutError.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXTypeNullabilityKind.cs b/sources/ClangSharp.Interop/clang/CXTypeNullabilityKind.cs index 652b65bbd..226a3f0e4 100644 --- a/sources/ClangSharp.Interop/clang/CXTypeNullabilityKind.cs +++ b/sources/ClangSharp.Interop/clang/CXTypeNullabilityKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXUnaryOperatorKind.cs b/sources/ClangSharp.Interop/clang/CXUnaryOperatorKind.cs index 6acb4b2c4..598305425 100644 --- a/sources/ClangSharp.Interop/clang/CXUnaryOperatorKind.cs +++ b/sources/ClangSharp.Interop/clang/CXUnaryOperatorKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; @@ -22,4 +22,5 @@ public enum CXUnaryOperatorKind CXUnaryOperator_Imag, CXUnaryOperator_Extension, CXUnaryOperator_Coawait, + CXUnaryOperator_Last = CXUnaryOperator_Coawait, } diff --git a/sources/ClangSharp.Interop/clang/CXUnsavedFile.cs b/sources/ClangSharp.Interop/clang/CXUnsavedFile.cs index dce87b451..0610ad6b7 100644 --- a/sources/ClangSharp.Interop/clang/CXUnsavedFile.cs +++ b/sources/ClangSharp.Interop/clang/CXUnsavedFile.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXVersion.cs b/sources/ClangSharp.Interop/clang/CXVersion.cs index 30f97e4b7..912b4b76e 100644 --- a/sources/ClangSharp.Interop/clang/CXVersion.cs +++ b/sources/ClangSharp.Interop/clang/CXVersion.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXVisibilityKind.cs b/sources/ClangSharp.Interop/clang/CXVisibilityKind.cs index b26370c52..a482d15eb 100644 --- a/sources/ClangSharp.Interop/clang/CXVisibilityKind.cs +++ b/sources/ClangSharp.Interop/clang/CXVisibilityKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CXVisitorResult.cs b/sources/ClangSharp.Interop/clang/CXVisitorResult.cs index f1dba9742..be4947dc3 100644 --- a/sources/ClangSharp.Interop/clang/CXVisitorResult.cs +++ b/sources/ClangSharp.Interop/clang/CXVisitorResult.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CX_BinaryOperatorKind.cs b/sources/ClangSharp.Interop/clang/CX_BinaryOperatorKind.cs index 8356428e1..910e3f2a9 100644 --- a/sources/ClangSharp.Interop/clang/CX_BinaryOperatorKind.cs +++ b/sources/ClangSharp.Interop/clang/CX_BinaryOperatorKind.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CX_CXXAccessSpecifier.cs b/sources/ClangSharp.Interop/clang/CX_CXXAccessSpecifier.cs index 934da7982..43d530321 100644 --- a/sources/ClangSharp.Interop/clang/CX_CXXAccessSpecifier.cs +++ b/sources/ClangSharp.Interop/clang/CX_CXXAccessSpecifier.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/CX_StorageClass.cs b/sources/ClangSharp.Interop/clang/CX_StorageClass.cs index 35a3c0bbe..9c57a8e51 100644 --- a/sources/ClangSharp.Interop/clang/CX_StorageClass.cs +++ b/sources/ClangSharp.Interop/clang/CX_StorageClass.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/IndexerCallbacks.cs b/sources/ClangSharp.Interop/clang/IndexerCallbacks.cs index 52d1de50f..6faf5d41c 100644 --- a/sources/ClangSharp.Interop/clang/IndexerCallbacks.cs +++ b/sources/ClangSharp.Interop/clang/IndexerCallbacks.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. namespace ClangSharp.Interop; diff --git a/sources/ClangSharp.Interop/clang/clang.cs b/sources/ClangSharp.Interop/clang/clang.cs index a460d0813..eb44391c8 100644 --- a/sources/ClangSharp.Interop/clang/clang.cs +++ b/sources/ClangSharp.Interop/clang/clang.cs @@ -1,6 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. using System; @@ -55,6 +55,12 @@ public static unsafe partial class @clang [DllImport("libclang", CallingConvention = CallingConvention.Cdecl, EntryPoint = "clang_ModuleMapDescriptor_dispose", ExactSpelling = true)] public static extern void ModuleMapDescriptor_dispose([NativeTypeName("CXModuleMapDescriptor")] CXModuleMapDescriptorImpl* param0); + [DllImport("libclang", CallingConvention = CallingConvention.Cdecl, EntryPoint = "clang_ModuleCache_prune", ExactSpelling = true)] + public static extern void ModuleCache_prune([NativeTypeName("const char *")] sbyte* Path, [NativeTypeName("time_t")] long PruneInterval, [NativeTypeName("time_t")] long PruneAfter); + + [DllImport("libclang", CallingConvention = CallingConvention.Cdecl, EntryPoint = "clang_ModuleCache_pruneWithCallback", ExactSpelling = true)] + public static extern void ModuleCache_pruneWithCallback([NativeTypeName("const char *")] sbyte* Path, [NativeTypeName("time_t")] long PruneInterval, [NativeTypeName("time_t")] long PruneAfter, [NativeTypeName("CXModuleCachePruneCallback")] delegate* unmanaged[Cdecl] Callback, void* UserData); + [DllImport("libclang", CallingConvention = CallingConvention.Cdecl, EntryPoint = "clang_CompilationDatabase_fromDirectory", ExactSpelling = true)] [return: NativeTypeName("CXCompilationDatabase")] public static extern void* CompilationDatabase_fromDirectory([NativeTypeName("const char *")] sbyte* BuildDir, CXCompilationDatabase_Error* ErrorCode); diff --git a/sources/ClangSharp.Interop/clangsharp/CX_AtomicOperatorKind.cs b/sources/ClangSharp.Interop/clangsharp/CX_AtomicOperatorKind.cs index 36e4f0686..3f36e0d27 100644 --- a/sources/ClangSharp.Interop/clangsharp/CX_AtomicOperatorKind.cs +++ b/sources/ClangSharp.Interop/clangsharp/CX_AtomicOperatorKind.cs @@ -15,6 +15,10 @@ public enum CX_AtomicOperatorKind CX_AO__atomic_exchange_n, CX_AO__atomic_fetch_add, CX_AO__atomic_fetch_and, + CX_AO__atomic_fetch_fmaximum, + CX_AO__atomic_fetch_fmaximum_num, + CX_AO__atomic_fetch_fminimum, + CX_AO__atomic_fetch_fminimum_num, CX_AO__atomic_fetch_max, CX_AO__atomic_fetch_min, CX_AO__atomic_fetch_nand, @@ -81,6 +85,10 @@ public enum CX_AtomicOperatorKind CX_AO__scoped_atomic_exchange_n, CX_AO__scoped_atomic_fetch_add, CX_AO__scoped_atomic_fetch_and, + CX_AO__scoped_atomic_fetch_fmaximum, + CX_AO__scoped_atomic_fetch_fmaximum_num, + CX_AO__scoped_atomic_fetch_fminimum, + CX_AO__scoped_atomic_fetch_fminimum_num, CX_AO__scoped_atomic_fetch_max, CX_AO__scoped_atomic_fetch_min, CX_AO__scoped_atomic_fetch_nand, diff --git a/sources/ClangSharp.Interop/clangsharp/CX_AttrKind.cs b/sources/ClangSharp.Interop/clangsharp/CX_AttrKind.cs index febce2e0a..4fb6abf60 100644 --- a/sources/ClangSharp.Interop/clangsharp/CX_AttrKind.cs +++ b/sources/ClangSharp.Interop/clangsharp/CX_AttrKind.cs @@ -23,12 +23,16 @@ public enum CX_AttrKind CX_AttrKind_CFIUncheckedCallee, CX_AttrKind_CmseNSCall, CX_AttrKind_ExtVectorType, + CX_AttrKind_HLSLColumnMajor, CX_AttrKind_HLSLContainedType, CX_AttrKind_HLSLGroupSharedAddressSpace, + CX_AttrKind_HLSLIsArray, CX_AttrKind_HLSLIsCounter, CX_AttrKind_HLSLROV, CX_AttrKind_HLSLRawBuffer, CX_AttrKind_HLSLResourceClass, + CX_AttrKind_HLSLResourceDimension, + CX_AttrKind_HLSLRowMajor, CX_AttrKind_NoDeref, CX_AttrKind_NonAllocating, CX_AttrKind_NonBlocking, @@ -42,6 +46,7 @@ public enum CX_AttrKind CX_AttrKind_OpenCLGlobalHostAddressSpace, CX_AttrKind_OpenCLLocalAddressSpace, CX_AttrKind_OpenCLPrivateAddressSpace, + CX_AttrKind_OverflowBehavior, CX_AttrKind_PointerAuth, CX_AttrKind_Ptr32, CX_AttrKind_Ptr64, @@ -64,6 +69,7 @@ public enum CX_AttrKind CX_AttrKind_AlwaysInline, CX_AttrKind_NoInline, CX_AttrKind_NoMerge, + CX_AttrKind_NoOutline, CX_AttrKind_Suppress, CX_AttrKind_AArch64SVEPcs, CX_AttrKind_AArch64VectorPcs, @@ -79,9 +85,11 @@ public enum CX_AttrKind CX_AttrKind_M68kRTD, CX_AttrKind_MSABI, CX_AttrKind_NSReturnsRetained, + CX_AttrKind_NoFieldProtection, CX_AttrKind_ObjCOwnership, CX_AttrKind_Pascal, CX_AttrKind_Pcs, + CX_AttrKind_PointerFieldProtection, CX_AttrKind_PreserveAll, CX_AttrKind_PreserveMost, CX_AttrKind_PreserveNone, @@ -236,12 +244,14 @@ public enum CX_AttrKind CX_AttrKind_GuardedBy, CX_AttrKind_GuardedVar, CX_AttrKind_HIPManaged, + CX_AttrKind_HLSLAssociatedResourceDecl, CX_AttrKind_HLSLNumThreads, CX_AttrKind_HLSLResourceBinding, CX_AttrKind_HLSLShader, CX_AttrKind_HLSLVkBinding, CX_AttrKind_HLSLVkConstantId, CX_AttrKind_HLSLVkExtBuiltinInput, + CX_AttrKind_HLSLVkExtBuiltinOutput, CX_AttrKind_HLSLVkPushConstant, CX_AttrKind_HLSLWaveSize, CX_AttrKind_Hot, @@ -313,6 +323,7 @@ public enum CX_AttrKind CX_AttrKind_OMPDeclareTargetDecl, CX_AttrKind_OMPDeclareVariant, CX_AttrKind_OMPGroupPrivateDecl, + CX_AttrKind_OMPTargetIndirectCall, CX_AttrKind_OMPThreadPrivateDecl, CX_AttrKind_OSConsumesThis, CX_AttrKind_OSReturnsNotRetained, @@ -344,6 +355,7 @@ public enum CX_AttrKind CX_AttrKind_Packed, CX_AttrKind_ParamTypestate, CX_AttrKind_PatchableFunctionEntry, + CX_AttrKind_Personality, CX_AttrKind_Pointer, CX_AttrKind_PragmaClangBSSSection, CX_AttrKind_PragmaClangDataSection, @@ -378,6 +390,7 @@ public enum CX_AttrKind CX_AttrKind_Sentinel, CX_AttrKind_SetTypestate, CX_AttrKind_SpeculativeLoadHardening, + CX_AttrKind_StackProtectorIgnore, CX_AttrKind_StandaloneDebug, CX_AttrKind_StrictFP, CX_AttrKind_StrictGuardStackCheck, diff --git a/sources/ClangSharp.Interop/clangsharp/CX_DeclKind.cs b/sources/ClangSharp.Interop/clangsharp/CX_DeclKind.cs index eb2b681dc..69ff4ce9f 100644 --- a/sources/ClangSharp.Interop/clangsharp/CX_DeclKind.cs +++ b/sources/ClangSharp.Interop/clangsharp/CX_DeclKind.cs @@ -14,6 +14,7 @@ public enum CX_DeclKind CX_DeclKind_ExternCContext, CX_DeclKind_Export, CX_DeclKind_Captured, + CX_DeclKind_CXXExpansionStmt, CX_DeclKind_Block, CX_DeclKind_StaticAssert, CX_DeclKind_PragmaDetectMismatch, @@ -137,6 +138,7 @@ public enum CX_DeclKind CX_DeclKind_FriendTemplate, CX_DeclKind_Friend, CX_DeclKind_FileScopeAsm, + CX_DeclKind_ExplicitInstantiation, CX_DeclKind_Empty, CX_DeclKind_AccessSpec, CX_DeclKind_FirstDecl = CX_DeclKind_TranslationUnit, diff --git a/sources/ClangSharp.Interop/clangsharp/CX_StmtClass.cs b/sources/ClangSharp.Interop/clangsharp/CX_StmtClass.cs index fb8530af7..981dfa617 100644 --- a/sources/ClangSharp.Interop/clangsharp/CX_StmtClass.cs +++ b/sources/ClangSharp.Interop/clangsharp/CX_StmtClass.cs @@ -36,26 +36,29 @@ public enum CX_StmtClass CX_StmtClass_OpaqueValueExpr, CX_StmtClass_OffsetOfExpr, CX_StmtClass_ObjCSubscriptRefExpr, - CX_StmtClass_ObjCStringLiteral, CX_StmtClass_ObjCSelectorExpr, CX_StmtClass_ObjCProtocolExpr, CX_StmtClass_ObjCPropertyRefExpr, + CX_StmtClass_ObjCStringLiteral, + CX_StmtClass_ObjCDictionaryLiteral, + CX_StmtClass_ObjCBoxedExpr, + CX_StmtClass_ObjCArrayLiteral, + CX_StmtClass_FirstObjCObjectLiteral = CX_StmtClass_ObjCStringLiteral, + CX_StmtClass_LastObjCObjectLiteral = CX_StmtClass_ObjCArrayLiteral, CX_StmtClass_ObjCMessageExpr, CX_StmtClass_ObjCIvarRefExpr, CX_StmtClass_ObjCIsaExpr, CX_StmtClass_ObjCIndirectCopyRestoreExpr, CX_StmtClass_ObjCEncodeExpr, - CX_StmtClass_ObjCDictionaryLiteral, - CX_StmtClass_ObjCBoxedExpr, CX_StmtClass_ObjCBoolLiteralExpr, CX_StmtClass_ObjCAvailabilityCheckExpr, - CX_StmtClass_ObjCArrayLiteral, CX_StmtClass_OMPIteratorExpr, CX_StmtClass_OMPArrayShapingExpr, CX_StmtClass_NoInitExpr, CX_StmtClass_MemberExpr, CX_StmtClass_MatrixSubscriptExpr, CX_StmtClass_MatrixSingleSubscriptExpr, + CX_StmtClass_MatrixElementExpr, CX_StmtClass_MaterializeTemporaryExpr, CX_StmtClass_MSPropertySubscriptExpr, CX_StmtClass_MSPropertyRefExpr, @@ -122,6 +125,7 @@ public enum CX_StmtClass CX_StmtClass_CXXStdInitializerListExpr, CX_StmtClass_CXXScalarValueInitExpr, CX_StmtClass_CXXRewrittenBinaryOperator, + CX_StmtClass_CXXReflectExpr, CX_StmtClass_CXXPseudoDestructorExpr, CX_StmtClass_CXXParenListInitExpr, CX_StmtClass_CXXNullPtrLiteralExpr, @@ -129,6 +133,7 @@ public enum CX_StmtClass CX_StmtClass_CXXNewExpr, CX_StmtClass_CXXInheritedCtorInitExpr, CX_StmtClass_CXXFoldExpr, + CX_StmtClass_CXXExpansionSelectExpr, CX_StmtClass_CXXDependentScopeMemberExpr, CX_StmtClass_CXXDeleteExpr, CX_StmtClass_CXXDefaultInitExpr, @@ -161,6 +166,7 @@ public enum CX_StmtClass CX_StmtClass_AttributedStmt, CX_StmtClass_FirstValueStmt = CX_StmtClass_LabelStmt, CX_StmtClass_LastValueStmt = CX_StmtClass_AttributedStmt, + CX_StmtClass_UnresolvedSYCLKernelCallStmt, CX_StmtClass_SwitchStmt, CX_StmtClass_DefaultStmt, CX_StmtClass_CaseStmt, @@ -262,6 +268,7 @@ public enum CX_StmtClass CX_StmtClass_OMPUnrollDirective, CX_StmtClass_OMPTileDirective, CX_StmtClass_OMPStripeDirective, + CX_StmtClass_OMPSplitDirective, CX_StmtClass_OMPReverseDirective, CX_StmtClass_OMPInterchangeDirective, CX_StmtClass_FirstOMPCanonicalLoopNestTransformationDirective = CX_StmtClass_OMPUnrollDirective, @@ -304,6 +311,8 @@ public enum CX_StmtClass CX_StmtClass_CapturedStmt, CX_StmtClass_CXXTryStmt, CX_StmtClass_CXXForRangeStmt, + CX_StmtClass_CXXExpansionStmtPattern, + CX_StmtClass_CXXExpansionStmtInstantiation, CX_StmtClass_CXXCatchStmt, CX_StmtClass_MSAsmStmt, CX_StmtClass_GCCAsmStmt, diff --git a/sources/ClangSharp.Interop/clangsharp/CX_TypeClass.cs b/sources/ClangSharp.Interop/clangsharp/CX_TypeClass.cs index 195d4710f..3b3e8ca75 100644 --- a/sources/ClangSharp.Interop/clangsharp/CX_TypeClass.cs +++ b/sources/ClangSharp.Interop/clangsharp/CX_TypeClass.cs @@ -41,6 +41,7 @@ public enum CX_TypeClass CX_TypeClass_ObjCObject, CX_TypeClass_ObjCInterface, CX_TypeClass_ObjCTypeParam, + CX_TypeClass_OverflowBehavior, CX_TypeClass_PackExpansion, CX_TypeClass_PackIndexing, CX_TypeClass_Paren, diff --git a/sources/ClangSharp.Interop/clangsharp/CX_TypeTrait.cs b/sources/ClangSharp.Interop/clangsharp/CX_TypeTrait.cs index f5ce256af..b101883a4 100644 --- a/sources/ClangSharp.Interop/clangsharp/CX_TypeTrait.cs +++ b/sources/ClangSharp.Interop/clangsharp/CX_TypeTrait.cs @@ -70,7 +70,8 @@ public enum CX_TypeTrait CX_UTT_IsUnsigned, CX_UTT_IsIntangibleType, CX_UTT_IsTypedResourceElementCompatible, - CX_UTT_Last = CX_UTT_IsTypedResourceElementCompatible, + CX_UTT_IsConstantBufferElementCompatible, + CX_UTT_Last = CX_UTT_IsConstantBufferElementCompatible, CX_BTT_TypeCompatible, CX_BTT_IsNothrowAssignable, CX_BTT_IsAssignable, diff --git a/sources/ClangSharp/Cursors/Exprs/StringLiteral.cs b/sources/ClangSharp/Cursors/Exprs/StringLiteral.cs index 3d340dd2d..0317ec7cd 100644 --- a/sources/ClangSharp/Cursors/Exprs/StringLiteral.cs +++ b/sources/ClangSharp/Cursors/Exprs/StringLiteral.cs @@ -1,7 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. using System; -using System.Runtime.InteropServices; using ClangSharp.Interop; using static ClangSharp.Interop.CXCursorKind; using static ClangSharp.Interop.CX_StmtClass; @@ -21,7 +20,8 @@ public unsafe string String { get { - var pCString = clang.getCString(Handle.StringLiteralValue); + using var value = Handle.StringLiteralValue; + var pCString = clang.getCString(value); if (pCString is null) { @@ -41,7 +41,7 @@ public unsafe string String case CX_SLK_Wide: { - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + if (constantArrayType.ElementType.SizeOf == 2) { goto case CX_SLK_UTF16; } diff --git a/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj b/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj index c13ea9c76..62a74468f 100644 --- a/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj +++ b/sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj @@ -41,7 +41,7 @@ C:\Program Files\LLVM\include - /usr/lib/llvm-20/include + /usr/lib/llvm-23/include diff --git a/sources/ClangSharpPInvokeGenerator/Properties/GenerateClang-LICENSE.txt b/sources/ClangSharpPInvokeGenerator/Properties/GenerateClang-LICENSE.txt index bd235802a..659eca25a 100644 --- a/sources/ClangSharpPInvokeGenerator/Properties/GenerateClang-LICENSE.txt +++ b/sources/ClangSharpPInvokeGenerator/Properties/GenerateClang-LICENSE.txt @@ -1,4 +1,4 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-21.1.8/clang/include/clang-c +// Ported from https://github.com/llvm/llvm-project/tree/llvmorg-23.1.5/clang/include/clang-c // Original source is Copyright (c) the LLVM Project and Contributors. Licensed under the Apache License v2.0 with LLVM Exceptions. See NOTICE.txt in the project root for license information. diff --git a/sources/ClangSharpPInvokeGenerator/Properties/GenerateClang.rsp b/sources/ClangSharpPInvokeGenerator/Properties/GenerateClang.rsp index f9843d649..7cff4f676 100644 --- a/sources/ClangSharpPInvokeGenerator/Properties/GenerateClang.rsp +++ b/sources/ClangSharpPInvokeGenerator/Properties/GenerateClang.rsp @@ -43,14 +43,17 @@ clang-c/Index.h clang-c/Platform.h clang-c/Rewrite.h --header-file -./Properties/GenerateClang-LICENSE.txt +./sources/ClangSharpPInvokeGenerator/Properties/GenerateClang-LICENSE.txt --method-class-name clang --namespace ClangSharp.Interop --output -./sources/ClangSharp/Interop +./sources/ClangSharp.Interop/clang --prefix-strip clang_ +--remap +CXCursorVisitorBlock=delegate* unmanaged[Cdecl] +CXCursorAndRangeVisitorBlock=delegate* unmanaged[Cdecl] --test-output ./tests/ClangSharp.UnitTests/InteropTests diff --git a/sources/ClangSharpPInvokeGenerator/Properties/GenerateClangSharp.rsp b/sources/ClangSharpPInvokeGenerator/Properties/GenerateClangSharp.rsp index 65e4869b2..3817a8247 100644 --- a/sources/ClangSharpPInvokeGenerator/Properties/GenerateClangSharp.rsp +++ b/sources/ClangSharpPInvokeGenerator/Properties/GenerateClangSharp.rsp @@ -25,23 +25,27 @@ unmanaged-constants vtbl-index-attribute --log potential-typedef-remappings +--exclude +BUILTIN --define-macro _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING --file libClangSharp/ClangSharp.h --header-file -./Properties/GenerateClangSharp-LICENSE.txt +./sources/ClangSharpPInvokeGenerator/Properties/GenerateClangSharp-LICENSE.txt --method-class-name clangsharp --namespace ClangSharp.Interop --output -./sources/ClangSharp/Interop +./sources/ClangSharp.Interop/clangsharp --prefix-strip clangsharp_ --remap MSGuidDeclParts=@Guid _CX_CK_Invalid=CX_CK_Invalid +clang::TemplateArgument=void +clang::TemplateArgumentLoc=void --test-output ./tests/ClangSharp.UnitTests/InteropTests --with-attribute diff --git a/sources/ClangSharpPInvokeGenerator/Properties/launchSettings.json b/sources/ClangSharpPInvokeGenerator/Properties/launchSettings.json index d65cba591..a76efd521 100644 --- a/sources/ClangSharpPInvokeGenerator/Properties/launchSettings.json +++ b/sources/ClangSharpPInvokeGenerator/Properties/launchSettings.json @@ -2,11 +2,13 @@ "profiles": { "GenerateClang": { "commandName": "Project", + "workingDirectory": "$(MSBuildProjectDirectory)/../..", "commandLineArgs": "\"@$(MSBuildProjectDirectory)/Properties/GenerateClang.rsp\" --file-directory \"$(LLVMIncludePath)\" --include-directory \"$(LLVMIncludePath)\" --library-path $(LibClangName)", "nativeDebugging": true }, "GenerateClangSharp": { "commandName": "Project", + "workingDirectory": "$(MSBuildProjectDirectory)/../..", "commandLineArgs": "\"@$(MSBuildProjectDirectory)/Properties/GenerateClangSharp.rsp\" --file-directory \"$(MSBuildProjectDirectory)/..\" --include-directory \"$(LLVMIncludePath)\" --library-path $(LibClangSharpName)" }, "GenerateLocal": { diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineTest.cs index 4d0cbbac4..ec975a8d9 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/BaselineTest.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; -using System.Runtime.InteropServices; using System.Threading.Tasks; using NUnit.Framework; @@ -22,17 +21,6 @@ protected BaselineTest(BaselineVariant variant) protected abstract string Area { get; } - // The win-arm64 libClangSharp 22.1.8.2 prebuilt returns invalid template names (see - // https://github.com/dotnet/ClangSharp/issues/806), so the generator can't emit correct bindings for - // template specializations on that RID. Skip the affected cases until the native package is rebuilt. - protected static void SkipUntilNativeRebuild() - { - if (OperatingSystem.IsWindows() && (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)) - { - Assert.Ignore("The win-arm64 libClangSharp prebuilt returns invalid template names. Remove this guard once the native lib is rebuilt. See https://github.com/dotnet/ClangSharp/issues/806."); - } - } - // The variant this fixture instance is exercising. Exposed so a migrated case can replicate a legacy no-op // (a folder that stubbed its *Impl to Task.CompletedTask) for the specific variants it was never run under. protected BaselineVariant Variant => _variant; diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsAssemblyAttributeWithHelperTypes.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsAssemblyAttributeWithHelperTypes.CSharp.Latest.Windows.cs index 9803a89de..e87c1e86f 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsAssemblyAttributeWithHelperTypes.CSharp.Latest.Windows.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsAssemblyAttributeWithHelperTypes.CSharp.Latest.Windows.cs @@ -3,7 +3,7 @@ using System.Diagnostics; using System.Runtime.InteropServices; -[assembly: GeneratedCode("ClangSharp", "22.1.8.0")] +[assembly: GeneratedCode("ClangSharp", "23.1.5.0")] namespace ClangSharp.Test { diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeAttributeInTypeMode.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeAttributeInTypeMode.CSharp.Latest.Windows.cs index 04e6165b3..7017a3694 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeAttributeInTypeMode.CSharp.Latest.Windows.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeAttributeInTypeMode.CSharp.Latest.Windows.cs @@ -3,19 +3,19 @@ namespace ClangSharp.Test { - [GeneratedCode("ClangSharp", "22.1.8.0")] + [GeneratedCode("ClangSharp", "23.1.5.0")] public enum MyEnum { MyEnum_Value, } - [GeneratedCode("ClangSharp", "22.1.8.0")] + [GeneratedCode("ClangSharp", "23.1.5.0")] public partial struct MyStruct { public int value; } - [GeneratedCode("ClangSharp", "22.1.8.0")] + [GeneratedCode("ClangSharp", "23.1.5.0")] public static unsafe partial class Methods { [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "?MyFunction@@YAXP6AXH@Z@Z", ExactSpelling = true)] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeAttributeOnDelegateInTypeMode.CSharp.Compatible.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeAttributeOnDelegateInTypeMode.CSharp.Compatible.Windows.cs index 7786d1e79..acfc05b79 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeAttributeOnDelegateInTypeMode.CSharp.Compatible.Windows.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeAttributeOnDelegateInTypeMode.CSharp.Compatible.Windows.cs @@ -4,23 +4,23 @@ namespace ClangSharp.Test { - [GeneratedCode("ClangSharp", "22.1.8.0")] + [GeneratedCode("ClangSharp", "23.1.5.0")] public enum MyEnum { MyEnum_Value, } - [GeneratedCode("ClangSharp", "22.1.8.0")] + [GeneratedCode("ClangSharp", "23.1.5.0")] public partial struct MyStruct { public int value; } [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - [GeneratedCode("ClangSharp", "22.1.8.0")] + [GeneratedCode("ClangSharp", "23.1.5.0")] public delegate void MyCallback(int value); - [GeneratedCode("ClangSharp", "22.1.8.0")] + [GeneratedCode("ClangSharp", "23.1.5.0")] public static partial class Methods { [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "?MyFunction@@YAXP6AXH@Z@Z", ExactSpelling = true)] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeInsteadOfAssemblyWithHelperTypes.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeInsteadOfAssemblyWithHelperTypes.CSharp.Latest.Windows.cs index e474a524d..7aef75732 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeInsteadOfAssemblyWithHelperTypes.CSharp.Latest.Windows.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/GeneratedCodeAttribute/EmitsPerTypeInsteadOfAssemblyWithHelperTypes.CSharp.Latest.Windows.cs @@ -5,19 +5,19 @@ namespace ClangSharp.Test { - [GeneratedCode("ClangSharp", "22.1.8.0")] + [GeneratedCode("ClangSharp", "23.1.5.0")] public enum MyEnum { MyEnum_Value, } - [GeneratedCode("ClangSharp", "22.1.8.0")] + [GeneratedCode("ClangSharp", "23.1.5.0")] public partial struct MyStruct { public int value; } - [GeneratedCode("ClangSharp", "22.1.8.0")] + [GeneratedCode("ClangSharp", "23.1.5.0")] public static unsafe partial class Methods { [DllImport("ClangSharpPInvokeGenerator", CallingConvention = CallingConvention.Cdecl, EntryPoint = "?MyFunction@@YAXP6AXH@Z@Z", ExactSpelling = true)] diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClass.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClass.CSharp.Latest.Windows.cs index 1c49a6a8b..1a359a07c 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClass.CSharp.Latest.Windows.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClass.CSharp.Latest.Windows.cs @@ -3,7 +3,7 @@ using System.Diagnostics; using System.Runtime.InteropServices; -[assembly: GeneratedCode("ClangSharp", "22.1.8.0")] +[assembly: GeneratedCode("ClangSharp", "23.1.5.0")] namespace ClangSharp.Test { diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClassFileScoped.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClassFileScoped.CSharp.Latest.Windows.cs index 1da59d554..fec9429dc 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClassFileScoped.CSharp.Latest.Windows.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedAfterMethodClassFileScoped.CSharp.Latest.Windows.cs @@ -3,7 +3,7 @@ using System.Diagnostics; using System.Runtime.InteropServices; -[assembly: GeneratedCode("ClangSharp", "22.1.8.0")] +[assembly: GeneratedCode("ClangSharp", "23.1.5.0")] namespace ClangSharp.Test; diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedFileScopedNamespace.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedFileScopedNamespace.CSharp.Latest.Windows.cs index 9809fdc7b..99dd7e35e 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedFileScopedNamespace.CSharp.Latest.Windows.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedFileScopedNamespace.CSharp.Latest.Windows.cs @@ -2,7 +2,7 @@ using System.CodeDom.Compiler; using System.Diagnostics; -[assembly: GeneratedCode("ClangSharp", "22.1.8.0")] +[assembly: GeneratedCode("ClangSharp", "23.1.5.0")] namespace ClangSharp.Test; diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedNamespace.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedNamespace.CSharp.Latest.Windows.cs index 347129fc8..f11fcca87 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedNamespace.CSharp.Latest.Windows.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/HelperTypes/HelperTypesEmittedInSharedNamespace.CSharp.Latest.Windows.cs @@ -2,7 +2,7 @@ using System.CodeDom.Compiler; using System.Diagnostics; -[assembly: GeneratedCode("ClangSharp", "22.1.8.0")] +[assembly: GeneratedCode("ClangSharp", "23.1.5.0")] namespace ClangSharp.Test { diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/TransparentStruct/BooleanKindGeneratesValidHelper.CSharp.Latest.Windows.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/TransparentStruct/BooleanKindGeneratesValidHelper.CSharp.Latest.Windows.cs index 6db55453b..751f0c479 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/TransparentStruct/BooleanKindGeneratesValidHelper.CSharp.Latest.Windows.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/Baselines/TransparentStruct/BooleanKindGeneratesValidHelper.CSharp.Latest.Windows.cs @@ -2,7 +2,7 @@ using System.CodeDom.Compiler; using System.Diagnostics; -[assembly: GeneratedCode("ClangSharp", "22.1.8.0")] +[assembly: GeneratedCode("ClangSharp", "23.1.5.0")] namespace ClangSharp.Test { diff --git a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/StructDeclarationTest.cs b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/StructDeclarationTest.cs index 0dd7ee9db..b9b50390e 100644 --- a/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/StructDeclarationTest.cs +++ b/tests/ClangSharp.PInvokeGenerator.UnitTests/Baseline/StructDeclarationTest.cs @@ -184,10 +184,6 @@ typedef struct [Test] public Task DependentTemplateBaseTest() { - // Resolving the dependent base relies on TemplateSpecializationType.TemplateName, which the - // win-arm64 prebuilt returns invalid; skip until the native lib is rebuilt. - SkipUntilNativeRebuild(); - // A dependent template-specialization base (`Base` within a class template) previously // crashed `GetRecordDecl` with an `InvalidCastException` when both template bindings and // empty-record exclusion were enabled, as the base resolves to a `ClassTemplateDecl` diff --git a/tests/ClangSharp.UnitTests/CursorTests/DeclTest.cs b/tests/ClangSharp.UnitTests/CursorTests/DeclTest.cs index c86a27e52..177c1cdeb 100644 --- a/tests/ClangSharp.UnitTests/CursorTests/DeclTest.cs +++ b/tests/ClangSharp.UnitTests/CursorTests/DeclTest.cs @@ -137,8 +137,6 @@ struct MyStruct [Test] public void FunctionTemplateSpecializationArgsTest() { - SkipUntilNativeRebuild(); - var inputContents = $@"template void MyFunction(T t, U u); @@ -158,8 +156,6 @@ public void FunctionTemplateSpecializationArgsTest() [Test] public void VarTemplateSpecializationArgsTest() { - SkipUntilNativeRebuild(); - var inputContents = $@"template constexpr int MyVar = 0; @@ -204,10 +200,6 @@ struct S { [Test] public void UsingEnumDeclEnumDeclTest() { - // Resolving UsingEnumDecl.EnumDecl relies on the native clangsharp_Cursor_getUsingEnumDeclEnumDecl - // shim, which the pinned 21.1 prebuilt package predates; skip until the native lib is rebuilt. - SkipUntilNativeRebuild(); - var inputContents = """ enum class E { A, B }; diff --git a/tests/ClangSharp.UnitTests/ExprTest.cs b/tests/ClangSharp.UnitTests/ExprTest.cs index e0508fe73..968e0bc44 100644 --- a/tests/ClangSharp.UnitTests/ExprTest.cs +++ b/tests/ClangSharp.UnitTests/ExprTest.cs @@ -11,6 +11,23 @@ public sealed class ExprTest : TranslationUnitTest { private static readonly string[] Cpp20CommandLineArgs = ["-std=c++20", "-Wno-pragma-once-outside-header"]; + [TestCase("x86_64-pc-windows-msvc", 2)] + [TestCase("x86_64-unknown-linux-gnu", 4)] + public void WideStringLiteralTargetWidthTest(string target, int charWidth) + { + var inputContents = """ +const wchar_t value[] = L"Test\0\u00E9\U0001F600"; +"""; + string[] commandLineArgs = ["-std=c++17", $"--target={target}"]; + + using var translationUnit = CreateTranslationUnit(inputContents, commandLineArgs: commandLineArgs); + var varDecl = translationUnit.TranslationUnitDecl.Decls.OfType().Single(); + var literal = (StringLiteral)varDecl.Init; + + Assert.That(((ConstantArrayType)literal.Type).ElementType.SizeOf, Is.EqualTo(charWidth)); + Assert.That(literal.String, Is.EqualTo("Test\0\u00E9\U0001F600")); + } + private static T? FindDescendant(Cursor cursor) where T : Cursor { diff --git a/tests/ClangSharp.UnitTests/TranslationUnitTest.cs b/tests/ClangSharp.UnitTests/TranslationUnitTest.cs index 2917c1d4d..4bbf3416a 100644 --- a/tests/ClangSharp.UnitTests/TranslationUnitTest.cs +++ b/tests/ClangSharp.UnitTests/TranslationUnitTest.cs @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. -using System; using System.Collections.Generic; -using System.Runtime.InteropServices; using System.Text; using ClangSharp.Interop; using NUnit.Framework; @@ -64,15 +62,4 @@ public abstract class TranslationUnitTest return TranslationUnit.GetOrCreate(translationUnit); } - - // The win-arm64 libClangSharp 22.1.8.2 prebuilt ships broken clangsharp shims: the new accessors - // return invalid data or access-violate, crashing or failing the tests that exercise them. Skip on - // that RID until the native package is rebuilt. See https://github.com/dotnet/ClangSharp/issues/806. - protected static void SkipUntilNativeRebuild() - { - if (OperatingSystem.IsWindows() && (RuntimeInformation.ProcessArchitecture == Architecture.Arm64)) - { - Assert.Ignore("The win-arm64 libClangSharp prebuilt ships broken clangsharp shims. Remove this guard once the native lib is rebuilt. See https://github.com/dotnet/ClangSharp/issues/806."); - } - } } diff --git a/tests/ClangSharp.UnitTests/TypeTest.cs b/tests/ClangSharp.UnitTests/TypeTest.cs index b5b5a4253..e60a9f31d 100644 --- a/tests/ClangSharp.UnitTests/TypeTest.cs +++ b/tests/ClangSharp.UnitTests/TypeTest.cs @@ -170,10 +170,6 @@ struct S { int field; void method(); }; [Test] public void TemplateNameTest() { - // Resolving TemplateSpecializationType.TemplateName relies on the native clangsharp shim, which - // the win-arm64 prebuilt returns invalid; skip until the native lib is rebuilt. - SkipUntilNativeRebuild(); - var inputContents = """ template struct Tmpl { T value; }; using SpecT = Tmpl; From b8af6015edfde97f7f39761834d6f5af35199794 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Wed, 4 Nov 2026 17:14:28 -0800 Subject: [PATCH 2/2] Expose LLVM 23.1.5 APIs in managed layers Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../Extensions/CXModuleCache.cs | 35 ++++++++++ .../Manual/CXModuleCachePruneCallback.cs | 9 +++ .../Cursors/Exprs/MatrixElementExpr.cs | 14 ++++ ...icalLoopSequenceTransformationDirective.cs | 18 +++++ .../Cursors/Stmts/OMPFuseDirective.cs | 14 ++++ .../Cursors/Stmts/OMPSplitDirective.cs | 14 ++++ sources/ClangSharp/Cursors/Stmts/Stmt.cs | 3 + .../ClangSharp.UnitTests.csproj | 1 + .../CursorTests/StmtTest.cs | 65 +++++++++++++++++++ tests/ClangSharp.UnitTests/ModuleCacheTest.cs | 65 +++++++++++++++++++ tests/ClangSharp.UnitTests/TypeTest.cs | 41 ++++++++++++ tests/ClangSharp.UnitTests/hlsl.h | 1 + 12 files changed, 280 insertions(+) create mode 100644 sources/ClangSharp.Interop/Extensions/CXModuleCache.cs create mode 100644 sources/ClangSharp.Interop/Manual/CXModuleCachePruneCallback.cs create mode 100644 sources/ClangSharp/Cursors/Exprs/MatrixElementExpr.cs create mode 100644 sources/ClangSharp/Cursors/Stmts/OMPCanonicalLoopSequenceTransformationDirective.cs create mode 100644 sources/ClangSharp/Cursors/Stmts/OMPFuseDirective.cs create mode 100644 sources/ClangSharp/Cursors/Stmts/OMPSplitDirective.cs create mode 100644 tests/ClangSharp.UnitTests/ModuleCacheTest.cs create mode 100644 tests/ClangSharp.UnitTests/hlsl.h diff --git a/sources/ClangSharp.Interop/Extensions/CXModuleCache.cs b/sources/ClangSharp.Interop/Extensions/CXModuleCache.cs new file mode 100644 index 000000000..6eedbdfb8 --- /dev/null +++ b/sources/ClangSharp.Interop/Extensions/CXModuleCache.cs @@ -0,0 +1,35 @@ +// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +using System; +using System.Runtime.InteropServices; + +namespace ClangSharp.Interop; + +public static unsafe class CXModuleCache +{ + public static void Prune(string path, long pruneIntervalSeconds, long pruneAfterSeconds) + { + using var marshaledPath = new MarshaledString(path); + clang.ModuleCache_prune(marshaledPath, pruneIntervalSeconds, pruneAfterSeconds); + } + + public static void PruneWithCallback(string path, long pruneIntervalSeconds, long pruneAfterSeconds, CXModuleCachePruneCallback? callback, CXClientData clientData = default) + { + delegate* unmanaged[Cdecl] pCallback = default; + + if (callback is not null) + { + pCallback = (delegate* unmanaged[Cdecl])Marshal.GetFunctionPointerForDelegate(callback); + } + + PruneWithCallback(path, pruneIntervalSeconds, pruneAfterSeconds, pCallback, clientData); + + GC.KeepAlive(callback); + } + + public static void PruneWithCallback(string path, long pruneIntervalSeconds, long pruneAfterSeconds, delegate* unmanaged[Cdecl] callback, CXClientData clientData = default) + { + using var marshaledPath = new MarshaledString(path); + clang.ModuleCache_pruneWithCallback(marshaledPath, pruneIntervalSeconds, pruneAfterSeconds, callback, clientData); + } +} diff --git a/sources/ClangSharp.Interop/Manual/CXModuleCachePruneCallback.cs b/sources/ClangSharp.Interop/Manual/CXModuleCachePruneCallback.cs new file mode 100644 index 000000000..d856f46af --- /dev/null +++ b/sources/ClangSharp.Interop/Manual/CXModuleCachePruneCallback.cs @@ -0,0 +1,9 @@ +// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +using System.Runtime.InteropServices; + +namespace ClangSharp.Interop; + +// The UTF-8 path is null-terminated and is only valid for the duration of the callback. +[UnmanagedFunctionPointer(CallingConvention.Cdecl)] +public unsafe delegate void CXModuleCachePruneCallback([NativeTypeName("const char *")] sbyte* path, [NativeTypeName("void *")] void* userData); diff --git a/sources/ClangSharp/Cursors/Exprs/MatrixElementExpr.cs b/sources/ClangSharp/Cursors/Exprs/MatrixElementExpr.cs new file mode 100644 index 000000000..557dc4016 --- /dev/null +++ b/sources/ClangSharp/Cursors/Exprs/MatrixElementExpr.cs @@ -0,0 +1,14 @@ +// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +using ClangSharp.Interop; +using static ClangSharp.Interop.CXCursorKind; +using static ClangSharp.Interop.CX_StmtClass; + +namespace ClangSharp; + +public sealed class MatrixElementExpr : Expr +{ + internal MatrixElementExpr(CXCursor handle) : base(handle, CXCursor_UnexposedExpr, CX_StmtClass_MatrixElementExpr) + { + } +} diff --git a/sources/ClangSharp/Cursors/Stmts/OMPCanonicalLoopSequenceTransformationDirective.cs b/sources/ClangSharp/Cursors/Stmts/OMPCanonicalLoopSequenceTransformationDirective.cs new file mode 100644 index 000000000..cbbbe8488 --- /dev/null +++ b/sources/ClangSharp/Cursors/Stmts/OMPCanonicalLoopSequenceTransformationDirective.cs @@ -0,0 +1,18 @@ +// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +using System; +using ClangSharp.Interop; +using static ClangSharp.Interop.CX_StmtClass; + +namespace ClangSharp; + +public class OMPCanonicalLoopSequenceTransformationDirective : OMPExecutableDirective +{ + private protected OMPCanonicalLoopSequenceTransformationDirective(CXCursor handle, CXCursorKind expectedCursorKind, CX_StmtClass expectedStmtClass) : base(handle, expectedCursorKind, expectedStmtClass) + { + if (handle.StmtClass is > CX_StmtClass_LastOMPCanonicalLoopSequenceTransformationDirective or < CX_StmtClass_FirstOMPCanonicalLoopSequenceTransformationDirective) + { + throw new ArgumentOutOfRangeException(nameof(handle)); + } + } +} diff --git a/sources/ClangSharp/Cursors/Stmts/OMPFuseDirective.cs b/sources/ClangSharp/Cursors/Stmts/OMPFuseDirective.cs new file mode 100644 index 000000000..c8c4c3110 --- /dev/null +++ b/sources/ClangSharp/Cursors/Stmts/OMPFuseDirective.cs @@ -0,0 +1,14 @@ +// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +using ClangSharp.Interop; +using static ClangSharp.Interop.CXCursorKind; +using static ClangSharp.Interop.CX_StmtClass; + +namespace ClangSharp; + +public sealed class OMPFuseDirective : OMPCanonicalLoopSequenceTransformationDirective +{ + internal OMPFuseDirective(CXCursor handle) : base(handle, CXCursor_OMPFuseDirective, CX_StmtClass_OMPFuseDirective) + { + } +} diff --git a/sources/ClangSharp/Cursors/Stmts/OMPSplitDirective.cs b/sources/ClangSharp/Cursors/Stmts/OMPSplitDirective.cs new file mode 100644 index 000000000..e95f997f4 --- /dev/null +++ b/sources/ClangSharp/Cursors/Stmts/OMPSplitDirective.cs @@ -0,0 +1,14 @@ +// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +using ClangSharp.Interop; +using static ClangSharp.Interop.CXCursorKind; +using static ClangSharp.Interop.CX_StmtClass; + +namespace ClangSharp; + +public sealed class OMPSplitDirective : OMPCanonicalLoopNestTransformationDirective +{ + internal OMPSplitDirective(CXCursor handle) : base(handle, CXCursor_OMPSplitDirective, CX_StmtClass_OMPSplitDirective) + { + } +} diff --git a/sources/ClangSharp/Cursors/Stmts/Stmt.cs b/sources/ClangSharp/Cursors/Stmts/Stmt.cs index b37b942a8..3249efe7a 100644 --- a/sources/ClangSharp/Cursors/Stmts/Stmt.cs +++ b/sources/ClangSharp/Cursors/Stmts/Stmt.cs @@ -148,6 +148,7 @@ public Stmt StripLabelLikeStatements() CX_StmtClass_NoInitExpr => new NoInitExpr(handle), CX_StmtClass_MemberExpr => new MemberExpr(handle), CX_StmtClass_MatrixSubscriptExpr => new MatrixSubscriptExpr(handle), + CX_StmtClass_MatrixElementExpr => new MatrixElementExpr(handle), CX_StmtClass_MaterializeTemporaryExpr => new MaterializeTemporaryExpr(handle), CX_StmtClass_MSPropertySubscriptExpr => new MSPropertySubscriptExpr(handle), CX_StmtClass_MSPropertyRefExpr => new MSPropertyRefExpr(handle), @@ -290,8 +291,10 @@ public Stmt StripLabelLikeStatements() CX_StmtClass_OMPUnrollDirective => new OMPUnrollDirective(handle), CX_StmtClass_OMPTileDirective => new OMPTileDirective(handle), CX_StmtClass_OMPStripeDirective => new OMPStripeDirective(handle), + CX_StmtClass_OMPSplitDirective => new OMPSplitDirective(handle), CX_StmtClass_OMPReverseDirective => new OMPReverseDirective(handle), CX_StmtClass_OMPInterchangeDirective => new OMPInterchangeDirective(handle), + CX_StmtClass_OMPFuseDirective => new OMPFuseDirective(handle), CX_StmtClass_OMPTeamsGenericLoopDirective => new OMPTeamsGenericLoopDirective(handle), CX_StmtClass_OMPTeamsDistributeSimdDirective => new OMPTeamsDistributeSimdDirective(handle), CX_StmtClass_OMPTeamsDistributeParallelForSimdDirective => new OMPTeamsDistributeParallelForSimdDirective(handle), diff --git a/tests/ClangSharp.UnitTests/ClangSharp.UnitTests.csproj b/tests/ClangSharp.UnitTests/ClangSharp.UnitTests.csproj index 817aea8e4..6a7067c4e 100644 --- a/tests/ClangSharp.UnitTests/ClangSharp.UnitTests.csproj +++ b/tests/ClangSharp.UnitTests/ClangSharp.UnitTests.csproj @@ -14,6 +14,7 @@ + diff --git a/tests/ClangSharp.UnitTests/CursorTests/StmtTest.cs b/tests/ClangSharp.UnitTests/CursorTests/StmtTest.cs index fa6080834..de82a140b 100644 --- a/tests/ClangSharp.UnitTests/CursorTests/StmtTest.cs +++ b/tests/ClangSharp.UnitTests/CursorTests/StmtTest.cs @@ -9,6 +9,71 @@ namespace ClangSharp.UnitTests; public sealed class StmtTest : TranslationUnitTest { + private static Cursor? FindDescendant(Cursor cursor, CXCursorKind kind) + { + foreach (var child in cursor.CursorChildren) + { + if (child.CursorKind == kind) + { + return child; + } + + if (FindDescendant(child, kind) is Cursor found) + { + return found; + } + } + + return null; + } + + [Test] + public void OMPSplitDirectiveTest() + { + var inputContents = """ +void f(int n) +{ +#pragma omp split counts(3, omp_fill, 2) + for (int i = 0; i < n; ++i) { } +} +"""; + + string[] commandLineArgs = ["-std=c++20", "-fopenmp", "-fopenmp-version=60", "-Wno-pragma-once-outside-header"]; + using var translationUnit = CreateTranslationUnit(inputContents, commandLineArgs: commandLineArgs); + + var functionDecl = translationUnit.TranslationUnitDecl.Decls.OfType() + .Single((functionDecl) => functionDecl.Name.Equals("f", StringComparison.Ordinal)); + var splitCursor = FindDescendant(functionDecl, CXCursorKind.CXCursor_OMPSplitDirective); + + Assert.That(splitCursor, Is.InstanceOf(), $"Statement={splitCursor?.Handle.IsStatement}; declaration={splitCursor?.Handle.IsDeclaration}; class={splitCursor?.Handle.StmtClass}"); + + _ = ((OMPSplitDirective)splitCursor!).Children.ToArray(); + } + + [Test] + public void OMPFuseDirectiveTest() + { + var inputContents = """ +void f(int n) +{ +#pragma omp fuse + { + for (int i = 0; i < n; ++i) { } + for (int j = 0; j < n; ++j) { } + } +} +"""; + + string[] commandLineArgs = ["-std=c++20", "-fopenmp", "-fopenmp-version=60", "-Wno-pragma-once-outside-header"]; + using var translationUnit = CreateTranslationUnit(inputContents, commandLineArgs: commandLineArgs); + + var functionDecl = translationUnit.TranslationUnitDecl.Decls.OfType() + .Single((functionDecl) => functionDecl.Name.Equals("f", StringComparison.Ordinal)); + var fuseCursor = FindDescendant(functionDecl, CXCursorKind.CXCursor_OMPFuseDirective); + + Assert.That(fuseCursor, Is.InstanceOf(), $"Statement={fuseCursor?.Handle.IsStatement}; declaration={fuseCursor?.Handle.IsDeclaration}; class={fuseCursor?.Handle.StmtClass}"); + } + [Test] public void IfStmtStatementKindTest() { diff --git a/tests/ClangSharp.UnitTests/ModuleCacheTest.cs b/tests/ClangSharp.UnitTests/ModuleCacheTest.cs new file mode 100644 index 000000000..c7c24127e --- /dev/null +++ b/tests/ClangSharp.UnitTests/ModuleCacheTest.cs @@ -0,0 +1,65 @@ +// Copyright (c) .NET Foundation and Contributors. All Rights Reserved. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.InteropServices; +using ClangSharp.Interop; +using NUnit.Framework; + +namespace ClangSharp.UnitTests; + +public sealed unsafe class ModuleCacheTest +{ + [Test] + public void PruneTest() + { + var path = Path.Combine(Path.GetTempPath(), $"ClangSharp-{Guid.NewGuid():N}"); + _ = Directory.CreateDirectory(path); + + try + { + CXModuleCache.Prune(path, pruneIntervalSeconds: 1, pruneAfterSeconds: 1); + + var modulePath = Path.Combine(path, "module.pcm"); + File.WriteAllText(modulePath, ""); + File.SetLastAccessTimeUtc(modulePath, DateTime.UnixEpoch); + + var timestampPath = Path.Combine(path, "modules.timestamp"); + File.WriteAllText(timestampPath, ""); + File.SetLastWriteTimeUtc(timestampPath, DateTime.UnixEpoch); + + var prunedPaths = new List(); + var callbackData = GCHandle.Alloc(prunedPaths); + + try + { + CXModuleCache.PruneWithCallback(path, pruneIntervalSeconds: 1, pruneAfterSeconds: 1, OnPrunedPath, (CXClientData)(void*)GCHandle.ToIntPtr(callbackData)); + } + finally + { + callbackData.Free(); + } + + Assert.That(File.Exists(modulePath), Is.False); + Assert.That(prunedPaths, Does.Contain(modulePath)); + } + finally + { + Directory.Delete(path, recursive: true); + } + } + + private static void OnPrunedPath(sbyte* path, void* userData) + { + var length = 0; + + while (path[length] != 0) + { + length++; + } + + var paths = (List?)GCHandle.FromIntPtr((IntPtr)userData).Target; + paths!.Add(new ReadOnlySpan((byte*)path, length).AsString()); + } +} diff --git a/tests/ClangSharp.UnitTests/TypeTest.cs b/tests/ClangSharp.UnitTests/TypeTest.cs index e60a9f31d..c6dce1d8e 100644 --- a/tests/ClangSharp.UnitTests/TypeTest.cs +++ b/tests/ClangSharp.UnitTests/TypeTest.cs @@ -9,6 +9,25 @@ namespace ClangSharp.UnitTests; public sealed class TypeTest : TranslationUnitTest { + private static T? FindDescendant(Cursor cursor) + where T : Cursor + { + if (cursor is T match) + { + return match; + } + + foreach (var child in cursor.CursorChildren) + { + if (FindDescendant(child) is T found) + { + return found; + } + } + + return null; + } + [Test] public void UnqualifiedTypeTest() { @@ -143,6 +162,28 @@ public void MatrixTypeTest() Assert.That(typedefs["IntT"].IsMatrixType, Is.False); } + [Test] + public void MatrixElementExprTest() + { + var inputContents = """ +typedef float Matrix4x4 __attribute__((matrix_type(4, 4))); +float GetElement(Matrix4x4 matrix) +{ + return matrix._m00; +} +"""; + + string[] commandLineArgs = ["-std=hlsl202x", "--target=dxil-pc-shadermodel6.0-library", $"-I{AppContext.BaseDirectory}"]; + using var translationUnit = CreateTranslationUnit(inputContents, language: "hlsl", commandLineArgs: commandLineArgs); + + var functionDecl = translationUnit.TranslationUnitDecl.Decls.OfType() + .Single((functionDecl) => functionDecl.Name.Equals("GetElement", StringComparison.Ordinal)); + var matrixElementExpr = FindDescendant(functionDecl); + + Assert.That(matrixElementExpr, Is.Not.Null); + Assert.That(matrixElementExpr!.StmtClass, Is.EqualTo(CX_StmtClass.CX_StmtClass_MatrixElementExpr)); + } + [Test] public void MemberPointerKindTest() { diff --git a/tests/ClangSharp.UnitTests/hlsl.h b/tests/ClangSharp.UnitTests/hlsl.h new file mode 100644 index 000000000..6f70f09be --- /dev/null +++ b/tests/ClangSharp.UnitTests/hlsl.h @@ -0,0 +1 @@ +#pragma once