On 5/15/19 5:40 AM, Martin Liška wrote:
On 5/14/19 11:31 PM, Martin Sebor wrote:
The attached patch implements the -Wformat-diag warning to help find
quoting, spelling, and other formatting issues in diagnostics issued
by GCC.

Just a general comment about this part. Wouldn't it make sense to use regex
for some of the string patterns that you address in the patch?

I'm not sure.  Are you wondering about the variants of type
names like "signed int" and "unsigned int" and the contractions?

The plain format checker scans and advances one word at a time
to be efficient.  It does linearly loop over the black-listed
words and operators and that could be made more efficient by
using a binary search.  Let me do that.  I would expect
introducing regexp to the checking to slow it down but
I suppose I could try it and see if you think it's worth it.

Martin

Reply via email to