func (i Index) ParseTranslationUnit2FullArgv(sourceFilename string, commandLineArgs []string, unsavedFiles []UnsavedFile, options uint32, outTU *TranslationUnit) ErrorCode {
	ca_commandLineArgs := make([]*C.char, len(commandLineArgs))
	var cp_commandLineArgs **C.char
	if len(commandLineArgs) > 0 {
		cp_commandLineArgs = &ca_commandLineArgs[0]
	}
	for i := range commandLineArgs {
		ci_str := C.CString(commandLineArgs[i])
		defer C.free(unsafe.Pointer(ci_str))
		ca_commandLineArgs[i] = ci_str
	}
	gos_unsavedFiles := (*reflect.SliceHeader)(unsafe.Pointer(&unsavedFiles))
	cp_unsavedFiles := (*C.struct_CXUnsavedFile)(unsafe.Pointer(gos_unsavedFiles.Data))
	c_sourceFilename := C.CString(sourceFilename)
	defer C.free(unsafe.Pointer(c_sourceFilename))
	return ErrorCode(C.clang_parseTranslationUnit2FullArgv(i.c, c_sourceFilename, cp_commandLineArgs, C.int(len(commandLineArgs)), cp_unsavedFiles, C.uint(len(unsavedFiles)), C.uint(options), &outTU.c))
}
Same as clang_parseTranslationUnit2 but requires a full command line for command_line_args including argv[0]. This is useful if the standard library paths are relative to the binary.
package clang
import "C"
import (
	"reflect"
	"unsafe"
)
type Index struct {
	c C.CXIndex
}
func NewIndex(excludeDeclarationsFromPCH int32, displayDiagnostics int32) Index {
	return Index{C.clang_createIndex(C.int(excludeDeclarationsFromPCH), C.int(displayDiagnostics))}
}
func (i Index) Dispose() {
	C.clang_disposeIndex(i.c)
}
func (i Index) SetGlobalOptions(options uint32) {
	C.clang_CXIndex_setGlobalOptions(i.c, C.uint(options))
}
func (i Index) GlobalOptions() uint32 {
	return uint32(C.clang_CXIndex_getGlobalOptions(i.c))
}
func (i Index) TranslationUnitFromSourceFile(sourceFilename string, clangCommandLineArgs []string, unsavedFiles []UnsavedFile) TranslationUnit {
	ca_clangCommandLineArgs := make([]*C.char, len(clangCommandLineArgs))
	var cp_clangCommandLineArgs **C.char
	if len(clangCommandLineArgs) > 0 {
		cp_clangCommandLineArgs = &ca_clangCommandLineArgs[0]
	}
	for i := range clangCommandLineArgs {
		ci_str := C.CString(clangCommandLineArgs[i])
		defer C.free(unsafe.Pointer(ci_str))
		ca_clangCommandLineArgs[i] = ci_str
	}
	gos_unsavedFiles := (*reflect.SliceHeader)(unsafe.Pointer(&unsavedFiles))
	cp_unsavedFiles := (*C.struct_CXUnsavedFile)(unsafe.Pointer(gos_unsavedFiles.Data))
	c_sourceFilename := C.CString(sourceFilename)
	defer C.free(unsafe.Pointer(c_sourceFilename))
	return TranslationUnit{C.clang_createTranslationUnitFromSourceFile(i.c, c_sourceFilename, C.int(len(clangCommandLineArgs)), cp_clangCommandLineArgs, C.uint(len(unsavedFiles)), cp_unsavedFiles)}
}
func (i Index) TranslationUnit(astFilename string) TranslationUnit {
	c_astFilename := C.CString(astFilename)
	defer C.free(unsafe.Pointer(c_astFilename))
	return TranslationUnit{C.clang_createTranslationUnit(i.c, c_astFilename)}
}
func (i Index) TranslationUnit2(astFilename string, outTU *TranslationUnit) ErrorCode {
	c_astFilename := C.CString(astFilename)
	defer C.free(unsafe.Pointer(c_astFilename))
	return ErrorCode(C.clang_createTranslationUnit2(i.c, c_astFilename, &outTU.c))
}
func (i Index) ParseTranslationUnit(sourceFilename string, commandLineArgs []string, unsavedFiles []UnsavedFile, options uint32) TranslationUnit {
	ca_commandLineArgs := make([]*C.char, len(commandLineArgs))
	var cp_commandLineArgs **C.char
	if len(commandLineArgs) > 0 {
		cp_commandLineArgs = &ca_commandLineArgs[0]
	}
	for i := range commandLineArgs {
		ci_str := C.CString(commandLineArgs[i])
		defer C.free(unsafe.Pointer(ci_str))
		ca_commandLineArgs[i] = ci_str
	}
	gos_unsavedFiles := (*reflect.SliceHeader)(unsafe.Pointer(&unsavedFiles))
	cp_unsavedFiles := (*C.struct_CXUnsavedFile)(unsafe.Pointer(gos_unsavedFiles.Data))
	c_sourceFilename := C.CString(sourceFilename)
	defer C.free(unsafe.Pointer(c_sourceFilename))
	return TranslationUnit{C.clang_parseTranslationUnit(i.c, c_sourceFilename, cp_commandLineArgs, C.int(len(commandLineArgs)), cp_unsavedFiles, C.uint(len(unsavedFiles)), C.uint(options))}
}
func (i Index) ParseTranslationUnit2(sourceFilename string, commandLineArgs []string, unsavedFiles []UnsavedFile, options uint32, outTU *TranslationUnit) ErrorCode {
	ca_commandLineArgs := make([]*C.char, len(commandLineArgs))
	var cp_commandLineArgs **C.char
	if len(commandLineArgs) > 0 {
		cp_commandLineArgs = &ca_commandLineArgs[0]
	}
	for i := range commandLineArgs {
		ci_str := C.CString(commandLineArgs[i])
		defer C.free(unsafe.Pointer(ci_str))
		ca_commandLineArgs[i] = ci_str
	}
	gos_unsavedFiles := (*reflect.SliceHeader)(unsafe.Pointer(&unsavedFiles))
	cp_unsavedFiles := (*C.struct_CXUnsavedFile)(unsafe.Pointer(gos_unsavedFiles.Data))
	c_sourceFilename := C.CString(sourceFilename)
	defer C.free(unsafe.Pointer(c_sourceFilename))
	return ErrorCode(C.clang_parseTranslationUnit2(i.c, c_sourceFilename, cp_commandLineArgs, C.int(len(commandLineArgs)), cp_unsavedFiles, C.uint(len(unsavedFiles)), C.uint(options), &outTU.c))
}