vsapsai added a comment.

It seems like there are too many asserts and they are too specific, they seem 
to be aimed at specific potential bugs. What about asserts that make sure we 
maintain some invariants? For example, check `DiagStr < DiagEnd` once in a loop 
instead of every place we increment `DiagStr`. Do you think it should catch the 
same problems but maybe a little bit later?
My suggestion is based on assumption that `FormatDiagnostic` works only with 
predefined format strings and not with strings provided by compiler users 
(arguments can be provided by users but not format strings).

I won't be able for some time to check the review again, so it's OK not to wait 
for my approval.


Repository:
  rC Clang

https://reviews.llvm.org/D51867



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to