implement a slow version of gb_clang_get_has_diagnostic().