Skip to content

Commit

Permalink
CPreProcessor: skip a newline after a backslash character in string o…
Browse files Browse the repository at this point in the history
…r char literals

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed Jan 10, 2023
1 parent 31b3b0f commit a674e97
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--sort=no
--fields-C={macrodef}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
X input.c /^#define X /;" d file: macrodef:"abc \\n\\t\tefg"
Y input.c /^#define Y /;" d file: macrodef:"abc"
A input.c /^#define A /;" d file: macrodef:'a'
B input.c /^#define B /;" d file: macrodef:'b'
C input.c /^#define C /;" d file: macrodef:'\\n'
D input-0.c /^#define D "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;" d file: macrodef:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalasS"
J input-1.c /^#define J /;" d file: macrodef:'aaaaaalast'
K input-1.c /^#define K /;" d file: macrodef:'aaaaaalast'
L input-1.c /^#define L /;" d file: macrodef:'aaaaaalast'
M input-1.c /^#define M /;" d file: macrodef:'aaaaaala\\n'
N input-1.c /^#define N /;" d file: macrodef:'aaaaaalast'
O input-1.c /^#define O /;" d file: macrodef:'aaaaaalaxx'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#define D "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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J 'aaaaaalastSHOULDNOTBETAGGED'
#define K 'aaaaaalast\n'
#define L 'aaaaaalas\nt'
#define M 'aaaaaala\nxx'
#define N 'aaaaaalas\
t'
#define O 'aaaaaala\
xx'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#define X "abc \n\t\
efg"
#define Y "abc"

#define A '\
a'

#define B 'b'
#define C '\n'
34 changes: 26 additions & 8 deletions parsers/cpreprocessor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,10 +1332,19 @@ static int skipToEndOfString (bool ignoreBackslash)
{
if (c == BACKSLASH && ! ignoreBackslash)
{
vStringPutWithLimit (Cpp.charOrStringContents, c, 1024);
c = cppGetcFromUngetBufferOrFile (); /* throw away next character, too */
if (c != EOF)
vStringPutWithLimit (Cpp.charOrStringContents, c, 1024);
int c0 = cppGetcFromUngetBufferOrFile ();
if (c0 == '\n')
continue;
if (c0 == EOF)
break;

if (vStringPutWithLimit (Cpp.charOrStringContents, c, 1024))
{
if (vStringPutWithLimit (Cpp.charOrStringContents, c0, 1024))
continue;
/* delete the last back slash at the end of the vstring. */
vStringChop(Cpp.charOrStringContents);
}
}
else if (c == DOUBLE_QUOTE)
break;
Expand Down Expand Up @@ -1410,10 +1419,19 @@ static int skipToEndOfChar ()
++count;
if (c == BACKSLASH)
{
vStringPutWithLimit (Cpp.charOrStringContents, c, 10);
c = cppGetcFromUngetBufferOrFile (); /* throw away next character, too */
if (c != EOF)
vStringPutWithLimit (Cpp.charOrStringContents, c, 10);
int c0 = cppGetcFromUngetBufferOrFile ();
if (c0 == '\n')
continue;
if (c0 == EOF)
break;

if (vStringPutWithLimit (Cpp.charOrStringContents, c, 10))
{
if (vStringPutWithLimit (Cpp.charOrStringContents, c0, 10))
continue;
/* delete the last back slash at the end of the vstring.*/
vStringChop(Cpp.charOrStringContents);
}
}
else if (c == SINGLE_QUOTE)
break;
Expand Down

0 comments on commit a674e97

Please sign in to comment.