@@ -90,12 +90,6 @@ static simplecpp::TokenList makeTokenList(const char code[], std::size_t size, s
90
90
return simplecpp::TokenList (istr,filenames,filename,outputList);
91
91
}
92
92
93
- static simplecpp::TokenList makeTokenList (const char code[])
94
- {
95
- std::vector<std::string> files;
96
- return makeTokenList (code, files);
97
- }
98
-
99
93
static std::string readfile (const char code[], simplecpp::OutputList *outputList=nullptr )
100
94
{
101
95
std::vector<std::string> files;
@@ -205,7 +199,8 @@ static void builtin()
205
199
static std::string testConstFold (const char code[])
206
200
{
207
201
try {
208
- simplecpp::TokenList expr = makeTokenList (code);
202
+ std::vector<std::string> files;
203
+ simplecpp::TokenList expr = makeTokenList (code, files);
209
204
expr.constFold ();
210
205
return expr.stringify ();
211
206
} catch (std::exception &) {
@@ -1656,7 +1651,8 @@ static void multiline5() // column
1656
1651
{
1657
1652
const char code[] = " #define A\\\n "
1658
1653
" (" ;
1659
- const simplecpp::TokenList rawtokens = makeTokenList (code);
1654
+ std::vector<std::string> files;
1655
+ const simplecpp::TokenList rawtokens = makeTokenList (code, files);
1660
1656
ASSERT_EQUALS (" # define A (" , rawtokens.stringify ());
1661
1657
ASSERT_EQUALS (11 , rawtokens.cback ()->location .col );
1662
1658
}
@@ -1666,7 +1662,8 @@ static void multiline6() // multiline string in macro
1666
1662
const char code[] = " #define string (\"\\\n "
1667
1663
" x\" )\n "
1668
1664
" string\n " ;
1669
- const simplecpp::TokenList rawtokens = makeTokenList (code);
1665
+ std::vector<std::string> files;
1666
+ const simplecpp::TokenList rawtokens = makeTokenList (code, files);
1670
1667
ASSERT_EQUALS (" # define string ( \" x\" )\n "
1671
1668
" \n "
1672
1669
" string" , rawtokens.stringify ());
@@ -1677,7 +1674,8 @@ static void multiline7() // multiline string in macro
1677
1674
const char code[] = " #define A(X) aaa { f(\"\\\n "
1678
1675
" a\" ); }\n "
1679
1676
" A(1)" ;
1680
- const simplecpp::TokenList rawtokens = makeTokenList (code);
1677
+ std::vector<std::string> files;
1678
+ const simplecpp::TokenList rawtokens = makeTokenList (code, files);
1681
1679
ASSERT_EQUALS (" # define A ( X ) aaa { f ( \" a\" ) ; }\n "
1682
1680
" \n "
1683
1681
" A ( 1 )" , rawtokens.stringify ());
0 commit comments