Fixed #2392 (Preprocessor: Wrong simplification of __VA_ARGS__)
This commit is contained in:
parent
571704f118
commit
2e7e118cb8
|
@ -1889,6 +1889,8 @@ public:
|
|||
break;
|
||||
if (Token::simpleMatch(tok, ". . . )"))
|
||||
{
|
||||
if (tok->previous()->str() == ",")
|
||||
_params.push_back("__VA_ARGS__");
|
||||
_variadic = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1750,9 +1750,9 @@ private:
|
|||
|
||||
void va_args_4()
|
||||
{
|
||||
const char filedata[] = "#define FRED(name, ...) name (__VA_ARGS__);\n"
|
||||
"FRED(abc, 123);\n";
|
||||
TODO_ASSERT_EQUALS("\nabc(123)\n", OurPreprocessor::expandMacros(filedata));
|
||||
const char filedata[] = "#define FRED(name, ...) name (__VA_ARGS__)\n"
|
||||
"FRED(abc, 123)\n";
|
||||
ASSERT_EQUALS("\nabc(123)\n", OurPreprocessor::expandMacros(filedata));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue