warn on unknown escapes after preprocessing
commitf83c2b8f0b5fcb8f60342b5a2fa51a84901f355a
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tue, 7 Feb 2017 17:45:06 +0000 (7 18:45 +0100)
committerChristopher Li <sparse@chrisli.org>
Mon, 13 Feb 2017 01:34:45 +0000 (13 09:34 +0800)
tree0a748cd0a58cf6736f596c63f6138573d785b690
parent4b81c44868bb0931464c48f9a6d776ffcd0515c1
warn on unknown escapes after preprocessing

Following the C standards conversion of escaped characters
must be done after preprocessing, just before adjacent
string concatenation. This is what is done but escape
sequence were recognized already at tokenization phase
and a warning is given then when an unknonw escape
sequence was encountered.
But there is no reason to give such warning at this
earlier phase, manly because yhere is no reasons
to warn on things which will be discarded during
the preprocessing.

Fix this by moving the diagnostic of unknown escape
sequence together with the escape conversion.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
char.c
tokenize.c
validation/escapes.c
validation/preprocessor/early-escape.c