Add bindings for diagnostic-related functions. #21