@property<EOL><INDENT>def diagnostics(self):<DEDENT>
class DiagIterator:<EOL><INDENT>def __init__(self, tu):<EOL><INDENT>self.tu = tu<EOL><DEDENT>def __len__(self):<EOL><INDENT>return int(conf.lib.clang_getNumDiagnostics(self.tu))<EOL><DEDENT>def __getitem__(self, key):<EOL><INDENT>diag = conf.lib.clang_getDiagnostic(self.tu, key)<EOL>if not diag:<EOL><INDENT>raise IndexError<EOL><DEDENT>return Diagnostic(diag)<EOL><DEDENT><DEDENT>return DiagIterator(self)<EOL>
Return an iterable (and indexable) object containing the diagnostics.