Skip to content
Permalink
Browse files

Add a helper library, libClangSharp, for exposing functionality not i…

…n libClang (#94)

* Adding a libClangSharp project to expose functionality not supported by libclang

* Generating bindings for libClangSharp

* Updating ClangSharp to use libClangSharp where applicable

* Adding Attr, Decl, Expr, Stmt, and Type types for the full set of exposed kinds
  • Loading branch information
tannergooding committed Nov 18, 2019
1 parent 2015395 commit ff9e62f98b047d7f2142c807be6be548afcd74e6
Showing 414 changed files with 6,081 additions and 1,685 deletions.
@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.13)

project(ClangSharp VERSION 9.0.0)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

add_subdirectory(sources)
@@ -27,7 +27,8 @@

<!-- Package versions for package references across all projects -->
<ItemGroup>
<PackageReference Update="libclang" Version="9.0.0" />
<PackageReference Update="libClang" Version="9.0.0" />
<PackageReference Update="libClangSharp" Version="9.0.0-beta1" />
<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" />
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.freebsd.11-x64</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>freebsd 11 x64 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.so" target="runtimes\freebsd.11-x64\native\libClangSharp.so" />
</files>
</package>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.freebsd.11-x86</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>freebsd 11 x86 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.so" target="runtimes\freebsd.11-x86\native\libClangSharp.so" />
</files>
</package>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.linux-arm</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>linux arm native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.so" target="runtimes\linux-arm\native\libClangSharp.so" />
</files>
</package>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.linux-arm64</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>linux arm64 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.so" target="runtimes\linux-arm64\native\libClangSharp.so" />
</files>
</package>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.osx-x64</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>osx x64 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.dylib" target="runtimes\osx-x64\native\libClangSharp.dylib" />
</files>
</package>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.sles-x64</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>sles x64 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.so" target="runtimes\sles-x64\native\libClangSharp.so" />
</files>
</package>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.ubuntu.14.04-x64</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>ubuntu 14.04 x64 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.so" target="runtimes\ubuntu.14.04-x64\native\libClangSharp.so" />
</files>
</package>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.ubuntu.16.04-x64</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>ubuntu 16.04 x64 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.so" target="runtimes\ubuntu.16.04-x64\native\libClangSharp.so" />
</files>
</package>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.ubuntu.18.04-x64</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>ubuntu 18.04 x64 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.so" target="runtimes\ubuntu.18.04-x64\native\libClangSharp.so" />
</files>
</package>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.ubuntu.19.04-x64</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>ubuntu 19.04 x64 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.so" target="runtimes\ubuntu.19.04-x64\native\libClangSharp.so" />
</files>
</package>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.win-x64</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>win x64 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.dll" target="runtimes\win-x64\native\libClangSharp.dll" />
</files>
</package>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>libClangSharp.runtime.win-x86</id>
<version>9.0.0-beta1</version>
<authors>Microsoft and Contributors</authors>
<owners>Microsoft and Contributors</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<license type="expression">NCSA</license>
<projectUrl>https://github.com/microsoft/clangsharp</projectUrl>
<description>win x86 native library for libClangSharp.</description>
<copyright>Copyright © Microsoft and Contributors</copyright>
<repository type="git" url="https://github.com/microsoft/clangsharp" branch="master" />
</metadata>
<files>
<file src="..\libClangSharp\LICENSE.TXT" target="LICENSE.TXT" />
<file src="..\libClangSharp\NOTICE.TXT" target="NOTICE.TXT" />
<file src="libClangSharp.dll" target="runtimes\win-x86\native\libClangSharp.dll" />
</files>
</package>
@@ -0,0 +1,12 @@
University of Illinois/NCSA Open Source License
Copyright (c) Microsoft and Contributors
All rights reserved.

Developed by: Microsoft and Contributors

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:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
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.
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.
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.

0 comments on commit ff9e62f

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