Skip to content

Commit 9e11ce0

Browse files
committed
Upgraded to Clang 14.0.4.
* ClangSharp has joined the .NET Foundation since we last updated. In the process its license and copyright notice changed. * ClangSharp no longer supports .NET 5, as such we no longer support .NET 5. (See #241 (comment)) * Clang 14 introduced a new "using" type class, and support for it was added to TypeReductionTransformation. Fixes #241
1 parent b0c3200 commit 9e11ce0

File tree

10 files changed

+40
-26
lines changed

10 files changed

+40
-26
lines changed

Biohazrd.AllInOne/Biohazrd.AllInOne.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55

66
<!--
77
This package is just a convenience package which brings in all the other components of Biohazrd.

Biohazrd.CSharp/Biohazrd.CSharp.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<PackageDescription>This package provides transformations and binding generation for C#.</PackageDescription>
66
</PropertyGroup>
77

Biohazrd.OutputGeneration/Biohazrd.OutputGeneration.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<PackageDescription>This package provides language-agnostic functionality for writing out code and other files.</PackageDescription>
66
</PropertyGroup>
77

Biohazrd.Transformation/Biohazrd.Transformation.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<PackageDescription>This package provides language-agnostic functionality for manipulating declaration trees.</PackageDescription>
66
</PropertyGroup>
77

Biohazrd.Transformation/Common/TypeReductionTransformation.cs

+8
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ protected override TypeTransformationResult TransformClangTypeReference(TypeTran
2222
{
2323
return new ClangTypeReference(elaboratedType.NamedType);
2424
}
25+
// Using types represent types accessed via C++ using declarations.
26+
// For example, given the code below, `x` will be a typed via `UsingType`.
27+
// using std::error_code;
28+
// error_code x;
29+
case Type { TypeClass: CX_TypeClass.CX_TypeClass_Using } usingType:
30+
{
31+
return new ClangTypeReference(usingType.Desugar);
32+
}
2533
// We don't care that `auto` or `decltype` was used for a type, so we just replace them with their canonical form
2634
case AutoType:
2735
case DecltypeType:

Biohazrd.Utilities/Biohazrd.Utilities.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<PackageDescription>This package provides various language-agnostic helpers for Biohazrd generators.</PackageDescription>
66
</PropertyGroup>
77

Biohazrd.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Biohazrd.CSharp.Tests", "Te
4343
EndProject
4444
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Biohazrd.OutputGeneration.Tests", "Tests\Biohazrd.OutputGeneration.Tests\Biohazrd.OutputGeneration.Tests.csproj", "{00E42A88-A883-4C43-BE2E-8A241A32EDA9}"
4545
EndProject
46-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Biohazrd.AllInOne", "Biohazrd.AllInOne\Biohazrd.AllInOne.csproj", "{093ABF1F-E8E2-4E24-BCEA-845255E5BC5F}"
46+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Biohazrd.AllInOne", "Biohazrd.AllInOne\Biohazrd.AllInOne.csproj", "{093ABF1F-E8E2-4E24-BCEA-845255E5BC5F}"
4747
EndProject
4848
Global
4949
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Biohazrd/Biohazrd.csproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<!-- The Biohazrd package is an all-in-one package which brings in everything so we need to disambiguate this one. -->
66
<PackageId>Biohazrd.Core</PackageId>
77
<PackageDescription>This package provides core functionality for parsing C/C++ libraries.</PackageDescription>
88

9-
<ClangSharpPathogenVersion>[0.0.3]</ClangSharpPathogenVersion>
9+
<ClangSharpPathogenVersion>[0.0.4]</ClangSharpPathogenVersion>
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="ClangSharp" Version="[12.0.0-beta2]" />
13+
<PackageReference Include="ClangSharp" Version="[14.0.0-beta2]" />
1414
<PackageReference Include="ClangSharp.Pathogen" Version="$(ClangSharpPathogenVersion)" />
1515
<PackageReference Include="ClangSharp.Pathogen.ClangResources" Version="$(ClangSharpPathogenVersion)" />
1616

1717
<!-- Exclude ClangSharp's runtime packages (we provide libclang and libClangSharp via ClangSharp.Pathogen -->
18-
<PackageReference Include="libClang" Version="12.0.0" PrivateAssets="all" />
19-
<PackageReference Include="libClangSharp" Version="12.0.0-beta1" PrivateAssets="all" />
18+
<PackageReference Include="libClang" Version="14.0.0" PrivateAssets="all" />
19+
<PackageReference Include="libClangSharp" Version="14.0.0-beta1" PrivateAssets="all" />
2020

2121
<!-- This package is needed to support __HACK__Stl1300Workaround -->
2222
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="2.3.2262-g94fae01e" />

THIRD-PARTY-NOTICES.md

+20-14
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,26 @@ Biohazrd incorporates third-party libraries licensed as follows.
1212

1313
# ClangSharp
1414

15-
```
16-
University of Illinois/NCSA Open Source License
17-
Copyright (c) Microsoft and Contributors
18-
All rights reserved.
19-
20-
Developed by: Microsoft and Contributors
21-
22-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
23-
24-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
25-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution.
26-
Neither the names of Microsoft, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission.
27-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
28-
```
15+
> # The MIT License (MIT)
16+
>
17+
> Copyright © .NET Foundation and Contributors. All Rights Reserved.
18+
>
19+
> Permission is hereby granted, free of charge, to any person obtaining a copy of
20+
> this software and associated documentation files (the "Software"), to deal in
21+
> the Software without restriction, including without limitation the rights to
22+
> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
23+
> the Software, and to permit persons to whom the Software is furnished to do so,
24+
> subject to the following conditions:
25+
>
26+
> The above copyright notice and this permission notice shall be included in all
27+
> copies or substantial portions of the Software.
28+
>
29+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
31+
> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
32+
> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
33+
> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
34+
> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2935
3036
# ClangSharp.Pathogen
3137

docs/PlatformSupport.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ In addition to Biohazrd's handling of ABI concerns, some features of Biohazrd re
8282

8383
### .NET runtime support
8484

85-
Biohazrd its self is a .NET 5 library, so generators themselves must target .NET 5 or newer. (.NET 6 or newer is recommended since .NET 5 is out of support. .NET 5 is supported a courtesy to those stuck on Visual Studio 2019.)
85+
Biohazrd its self is a .NET 6 library, so generators themselves must target .NET 6 or newer. We intend to support .NET 6 for as long as it is supported by Microsoft. (.NET 5 support was dropped in [v0.0.0-beta4](https://github.com/MochiLibraries/Biohazrd/releases/tag/v0.0.0-beta4).)
8686

8787
As for the wrappers you generate with said generators, Biohazrd is not especially opinionated about the version of the .NET Runtime you target, but it does prefer generating C# 10 code. (C# 9 if you ask nicely.)
8888

0 commit comments

Comments
 (0)