Fix spurious conform test failures
Zack Weinberg
zackw@panix.com
Mon Jul 27 14:54:00 GMT 2015
Since it's not particularly difficult to write a Perl regex that
matches C string constants *with* \-escapes taken into account, can I
suggest we do that now instead of when we trip over it? Also, should
do the same thing for character
constants.
# Discard string and character constants. Since this is preprocessor
# output we need not worry about \-newline or un-terminated strings,
# and since we just need to find the end, we don't need to distinguish
# the various types of \-escapes.
$str =~ s/" (?: [^"\\] | \\. )* "//xg;
$str =~ s/' (?: [^'\\] | \\. )* '//xg;
zw
More information about the Libc-alpha
mailing list