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); } }