Skip to content
Permalink
Browse files

Updating the codebase to Clang v9.0.0 (#86)

* Updating the libclang packages nuspec to the 9.0.0 versions

* Regenerating the bindings for v9.0.0

* Adding higher level bindings over the new APIs

* Updating the libclang Package reference to 9.0.0
  • Loading branch information...
tannergooding committed Sep 27, 2019
1 parent 6e994d7 commit e99347a172101c01f39155eec9fe37ce63c458e3
Showing with 100 additions and 51 deletions.
  1. +1 −1 Directory.Build.targets
  2. +3 −3 packages/libclang.runtime.freebsd.11-x64/libclang.runtime.freebsd.11-x64.nuspec
  3. +3 −3 packages/libclang.runtime.freebsd.11-x86/libclang.runtime.freebsd.11-x86.nuspec
  4. +3 −3 packages/libclang.runtime.linux-arm/libclang.runtime.linux-arm.nuspec
  5. +3 −3 packages/libclang.runtime.linux-arm64/libclang.runtime.linux-arm64.nuspec
  6. +3 −3 packages/libclang.runtime.osx-x64/libclang.runtime.osx-x64.nuspec
  7. +3 −3 packages/libclang.runtime.sles-x64/libclang.runtime.sles-x64.nuspec
  8. +3 −3 packages/libclang.runtime.ubuntu.14.04-x64/libclang.runtime.ubuntu.14.04-x64.nuspec
  9. +3 −3 packages/libclang.runtime.ubuntu.16.04-x64/libclang.runtime.ubuntu.16.04-x64.nuspec
  10. +3 −3 packages/libclang.runtime.ubuntu.18.04-x64/libclang.runtime.ubuntu.18.04-x64.nuspec
  11. +19 −0 packages/libclang.runtime.ubuntu.19.04-x64/libclang.runtime.ubuntu.19.04-x64.nuspec
  12. +3 −3 packages/libclang.runtime.win-x64/libclang.runtime.win-x64.nuspec
  13. +3 −3 packages/libclang.runtime.win-x86/libclang.runtime.win-x86.nuspec
  14. +1 −1 packages/libclang/LICENSE.TXT
  15. +2 −2 packages/libclang/libclang.nuspec
  16. +16 −11 packages/libclang/runtime.json
  17. +2 −0 sources/ClangSharp/Cursors/Decls/NamespaceDecl.cs
  18. +2 −0 sources/ClangSharp/Cursors/Decls/RecordDecl.cs
  19. +4 −0 sources/ClangSharp/Interop.Extensions/CXCursor.cs
  20. +7 −2 sources/ClangSharp/Interop/CXCursorKind.cs
  21. +1 −0 sources/ClangSharp/Interop/CXCursor_ExceptionSpecificationKind.cs
  22. +1 −0 sources/ClangSharp/Interop/CXTranslationUnit_Flags.cs
  23. +1 −0 sources/ClangSharp/Interop/CXTypeKind.cs
  24. +1 −0 sources/ClangSharp/Interop/CXTypeLayoutError.cs
  25. +8 −0 sources/ClangSharp/Interop/clang.cs
  26. +1 −1 sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj
@@ -27,7 +27,7 @@

<!-- Package versions for package references across all projects -->
<ItemGroup>
<PackageReference Update="libclang" Version="8.0.0" />
<PackageReference Update="libclang" Version="9.0.0" />
<PackageReference Update="Microsoft.Bcl.HashCode" Version="1.0.0-preview6.19303.8" />
<PackageReference Update="Microsoft.Net.Compilers.Toolset" Version="3.2.0-beta1-final" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.1.1" />
@@ -2,18 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.freebsd.11-x64</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>freebsd 11 x64 native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="runtimes\freebsd.11-x64\native\libclang.so" target="runtimes\freebsd.11-x64\native\libclang.so" />
<file src="libclang.so" target="runtimes\freebsd.11-x64\native\libclang.so" />
</files>
</package>
@@ -2,18 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.freebsd.11-x86</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>freebsd 11 x86 native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="runtimes\freebsd.11-x86\native\libclang.so" target="runtimes\freebsd.11-x86\native\libclang.so" />
<file src="libclang.so" target="runtimes\freebsd.11-x86\native\libclang.so" />
</files>
</package>
@@ -2,18 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.linux-arm</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>linux arm native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="runtimes\linux-arm\native\libclang.so" target="runtimes\linux-arm\native\libclang.so" />
<file src="libclang.so" target="runtimes\linux-arm\native\libclang.so" />
</files>
</package>
@@ -2,18 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.linux-arm64</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>linux arm64 native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="runtimes\linux-arm64\native\libclang.so" target="runtimes\linux-arm64\native\libclang.so" />
<file src="libclang.so" target="runtimes\linux-arm64\native\libclang.so" />
</files>
</package>
@@ -2,18 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.osx-x64</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>osx x64 native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="runtimes\osx-x64\native\libclang.dylib" target="runtimes\osx-x64\native\libclang.dylib" />
<file src="libclang.dylib" target="runtimes\osx-x64\native\libclang.dylib" />
</files>
</package>
@@ -2,18 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.sles-x64</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>sles x64 native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="runtimes\sles-x64\native\libclang.so" target="runtimes\sles-x64\native\libclang.so" />
<file src="libclang.so" target="runtimes\sles-x64\native\libclang.so" />
</files>
</package>
@@ -2,18 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.ubuntu.14.04-x64</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>ubuntu 14.04 x64 native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="runtimes\ubuntu.14.04-x64\native\libclang.so" target="runtimes\ubuntu.14.04-x64\native\libclang.so" />
<file src="libclang.so" target="runtimes\ubuntu.14.04-x64\native\libclang.so" />
</files>
</package>
@@ -2,18 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.ubuntu.16.04-x64</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>ubuntu 16.04 x64 native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="runtimes\ubuntu.16.04-x64\native\libclang.so" target="runtimes\ubuntu.16.04-x64\native\libclang.so" />
<file src="libclang.so" target="runtimes\ubuntu.16.04-x64\native\libclang.so" />
</files>
</package>
@@ -2,18 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.ubuntu.18.04-x64</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>ubuntu 18.04 x64 native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="runtimes\ubuntu.18.04-x64\native\libclang.so" target="runtimes\ubuntu.18.04-x64\native\libclang.so" />
<file src="libclang.so" target="runtimes\ubuntu.18.04-x64\native\libclang.so" />
</files>
</package>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.ubuntu.19.04-x64</id>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>ubuntu 19.04 x64 native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="libclang.so" target="runtimes\ubuntu.19.04-x64\native\libclang.so" />
</files>
</package>
@@ -2,18 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.win-x64</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>win x64 native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="runtimes\win-x64\native\libclang.dll" target="runtimes\win-x64\native\libclang.dll" />
<file src="libclang.dll" target="runtimes\win-x64\native\libclang.dll" />
</files>
</package>
@@ -2,18 +2,18 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang.runtime.win-x86</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>win x86 native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
</metadata>
<files>
<file src="..\libclang\LICENSE.TXT" target="LICENSE.TXT" />
<file src="runtimes\win-x86\native\libclang.dll" target="runtimes\win-x86\native\libclang.dll" />
<file src="libclang.dll" target="runtimes\win-x86\native\libclang.dll" />
</files>
</package>
@@ -275,4 +275,4 @@ 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.
SOFTWARE.
@@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libclang</id>
<version>8.0.0</version>
<version>9.0.0</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">Apache-2.0</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>Multi-platform native library for libclang.</description>
<copyright>Copyright © University of Illinois at Urbana-Champaign</copyright>
<repository type="git" url="https://github.com/llvm-mirror/clang" branch="release_80" />
<repository type="git" url="https://github.com/llvm/llvm-project" branch="llvmorg-9.0.0" />
<dependencies>
<group targetFramework=".NETStandard1.0">
<dependency id="Microsoft.NETCore.Platforms" version="1.0.1" />
@@ -2,57 +2,62 @@
"runtimes": {
"freebsd.11-x64": {
"libclang": {
"libclang.runtime.freebsd.11-x64": "8.0.0"
"libclang.runtime.freebsd.11-x64": "9.0.0"
}
},
"freebsd.11-x86": {
"libclang": {
"libclang.runtime.freebsd.11-x86": "8.0.0"
"libclang.runtime.freebsd.11-x86": "9.0.0"
}
},
"linux-arm": {
"libclang": {
"libclang.runtime.linux-arm": "8.0.0"
"libclang.runtime.linux-arm": "9.0.0"
}
},
"linux-arm64": {
"libclang": {
"libclang.runtime.linux-arm64": "8.0.0"
"libclang.runtime.linux-arm64": "9.0.0"
}
},
"osx-x64": {
"libclang": {
"libclang.runtime.osx-x64": "8.0.0"
"libclang.runtime.osx-x64": "9.0.0"
}
},
"sles-x64": {
"libclang": {
"libclang.runtime.sles-x64": "8.0.0"
"libclang.runtime.sles-x64": "9.0.0"
}
},
"ubuntu.14.04-x64": {
"libclang": {
"libclang.runtime.ubuntu.14.04-x64": "8.0.0"
"libclang.runtime.ubuntu.14.04-x64": "9.0.0"
}
},
"ubuntu.16.04-x64": {
"libclang": {
"libclang.runtime.ubuntu.16.04-x64": "8.0.0"
"libclang.runtime.ubuntu.16.04-x64": "9.0.0"
}
},
"ubuntu.18.04-x64": {
"libclang": {
"libclang.runtime.ubuntu.18.04-x64": "8.0.0"
"libclang.runtime.ubuntu.18.04-x64": "9.0.0"
}
},
"ubuntu.19.04-x64": {
"libclang": {
"libclang.runtime.ubuntu.19.04-x64": "9.0.0"
}
},
"win-x64": {
"libclang": {
"libclang.runtime.win-x64": "8.0.0"
"libclang.runtime.win-x64": "9.0.0"
}
},
"win-x86": {
"libclang": {
"libclang.runtime.win-x86": "8.0.0"
"libclang.runtime.win-x86": "9.0.0"
}
}
}
@@ -16,6 +16,8 @@ internal NamespaceDecl(CXCursor handle) : base(handle, CXCursorKind.CXCursor_Nam

public bool IsAnonymousNamespace => Handle.IsAnonymous;

public bool IsInlineNamespace => Handle.IsInlineNamespace;

public IReadOnlyList<Decl> Decls => _decls.Value;

public IDeclContext LexicalParent => LexicalDeclContext;
@@ -14,6 +14,8 @@ internal RecordDecl(CXCursor handle, CXCursorKind expectedKind) : base(handle, e
_fields = new Lazy<IReadOnlyList<FieldDecl>>(() => Decls.Where((decl) => decl is FieldDecl).Cast<FieldDecl>().ToList());
}

public bool IsAnonymousRecord => Handle.IsAnonymousRecordDecl;

public IReadOnlyList<FieldDecl> Fields => _fields.Value;

public bool IsUnion => Kind == CXCursorKind.CXCursor_UnionDecl;

0 comments on commit e99347a

Please sign in to comment.
You can’t perform that action at this time.