274{
275 std::string level_str;
276 switch (level) {
277 case clang::DiagnosticsEngine::Ignored:
278 level_str = "IGNORED";
279 break;
280 case clang::DiagnosticsEngine::Note:
281 level_str = "NOTE";
282 break;
283 case clang::DiagnosticsEngine::Remark:
284 level_str = "REMARK";
285 break;
286 case clang::DiagnosticsEngine::Warning:
287 level_str = "WARNING";
288 break;
289 case clang::DiagnosticsEngine::Error:
290 level_str = "ERROR";
291 break;
292 case clang::DiagnosticsEngine::Fatal:
293 level_str = "FATAL";
294 break;
295 default:
296 level_str = "UNKNOWN";
297 break;
298 }
299
300 return level_str;
301}