Skip to content

Commit 532f998

Browse files
committed
issue doxygen#11849 Incorrect evaluation of __VA_OPT__ when preprocessing
1 parent 446d055 commit 532f998

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/doxygen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10180,7 +10180,7 @@ static void runQHelpGenerator()
1018010180
static const reg::Ex versionReg(R"(Qt (\d+)\.(\d+)\.(\d+))");
1018110181
reg::Match match;
1018210182
std::string s = inBuf;
10183-
if (reg::search(inBuf,match,versionReg))
10183+
if (reg::search(s,match,versionReg))
1018410184
{
1018510185
qtVersion = 10000*QCString(match[1].str()).toInt() +
1018610186
100*QCString(match[2].str()).toInt() +

src/pre.l

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3052,7 +3052,8 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
30523052
// expr='( something __VA_OPT__(value) )' or '( something __VA_OPT__(value) something_else )'
30533053
static const reg::Ex re(R"(__VA_OPT__\((.*)\)(.*)\))");
30543054
reg::Match m;
3055-
if (reg::search(expr.mid(p).str(),m,re))
3055+
std::string s = expr.mid(p).str();
3056+
if (reg::search(s,m,re))
30563057
{
30573058
assert(m.size()==3);
30583059
std::string value = m[1].str();

0 commit comments

Comments
 (0)