/** * \brief Retrieve a diagnostic associated with the given code completion. * * \param Results the code completion results to query. * \param Index the zero-based diagnostic number to retrieve. * * \returns the requested diagnostic. This diagnostic must be freed * via a call to \c clang_disposeDiagnostic(). */ func (ccr CodeCompleteResults) Diagnostics() (ret Diagnostics) { ret = make(Diagnostics, C.clang_codeCompleteGetNumDiagnostics(ccr.c)) for i := range ret { ret[i].c = C.clang_codeCompleteGetDiagnostic(ccr.c, C.uint(i)) } return }
// Determine the number of diagnostics produced prior to the location where code completion was performed. func (ccr *CodeCompleteResults) NumDiagnostics() uint32 { return uint32(C.clang_codeCompleteGetNumDiagnostics(ccr.c)) }