Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

libimobiledevice-win32/Core.Clang

 
 

Repository files navigation

Core.Clang

Windows Ubuntu
Build Status Build Status

This project selectively imports some routines from LLVM/libclang via Platform Invoke to facilitate cross platform C/C++ code analysis in .NET Core. It provides thorough XML documentation, and tries to follow the framework design guidelines without deviating too far away from the original interfaces.

Example

string tempPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
Directory.CreateDirectory(tempPath);
string fileName = Path.Combine(tempPath, "main.cpp");
File.WriteAllText(fileName, "void HelloWorld();");
using (var index = new Index(true, true))
using (var translationUnit = index.ParseTranslationUnit(fileName, new[] { "-v" }))
{
    var location = translationUnit.GetFile(fileName).GetLocationFromOffset(0);
    Console.WriteLine(translationUnit.GetCursor(location).GetSpelling());
}

Remarks

This project ignores:

  • x86
  • CLS compliance
  • Doxygen
  • Objective-C

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.9%
  • C++ 0.1%