コード例 #1
0
ファイル: SourceLocation.cs プロジェクト: JadeHub/LibClangCS
 internal unsafe SourceLocation(Library.SourceLocation handle, ITranslationUnitItemFactory itemFactory)
 {
     Debug.Assert(!handle.IsNull);
     Handle = handle;
     _itemFactory = itemFactory;
     IntPtr file = IntPtr.Zero;
     uint line, column, offset;
     Library.clang_getInstantiationLocation(Handle, &file, out line, out column, out offset);
     Line = (int)line;
     Column = (int)column;
     Offset = (int)offset;
     if (file != IntPtr.Zero)
     {
         File = _itemFactory.CreateFile(file);
     }
 }