Exemple #1
0
/**
 * \brief Retrieve the name of the command-line option that enabled this
 * diagnostic.
 *
 * \param Diag The diagnostic to be queried.
 *
 * \param Disable If non-NULL, will be set to the option that disables this
 * diagnostic (if any).
 *
 * \returns A string that contains the command-line option used to enable this
 * warning, such as "-Wconversion" or "-pedantic".
 */
func (d Diagnostic) Option() (enable, disable string) {
	var c_disable cxstring
	cx := cxstring{C.clang_getDiagnosticOption(d.c, &c_disable.c)}
	defer cx.Dispose()
	defer c_disable.Dispose()
	return cx.String(), c_disable.String()
}
Exemple #2
0
/*
	Retrieve the name of the command-line option that enabled this
	diagnostic.

	Parameter Diag The diagnostic to be queried.

	Parameter Disable If non-NULL, will be set to the option that disables this
	diagnostic (if any).

	Returns A string that contains the command-line option used to enable this
	warning, such as "-Wconversion" or "-pedantic".
*/
func (d Diagnostic) Option() (string, string) {
	var disable cxstring
	defer disable.Dispose()

	o := cxstring{C.clang_getDiagnosticOption(d.c, &disable.c)}
	defer o.Dispose()

	return disable.String(), o.String()
}