[PATCH] D51867: [Diagnostics][NFC] Add error handling to FormatDiagnostic()

2018-09-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Regarding the asserts to catch potential problems, seems most of them are for buffer overflows. Aren't sanitizers catching those cases, specifically Address Sanitizer? I haven't checked, just seems it would be good to check buffer overflow automatically instead of using

[PATCH] D51867: [Diagnostics][NFC] Add error handling to FormatDiagnostic()

2018-09-10 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: arphaman, vsapsai. jkorous added a project: clang. Herald added subscribers: cfe-commits, dexonsmith. There seem to be couple implicit assumptions that might be better represented explicitly by asserts. Repository: rC Clang https://revi