Skip to content

Commit ddd1f55

Browse files
committed
fix
1 parent ccd4104 commit ddd1f55

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎lib/tokenize.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,8 @@ namespace {
10341034
to = to->next();
10351035
to->isSimplifiedTypedef(true);
10361036
to->isExternC(from->isExternC());
1037+
if (from->isExpandedMacro())
1038+
to->setMacroName(from->getMacroName());
10371039
}
10381040
return to;
10391041
}

‎lib/tokenlist.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ Token *TokenList::copyTokens(Token *dest, const Token *first, const Token *last,
267267
tok2->flags(tok->flags());
268268
tok2->varId(tok->varId());
269269
tok2->setTokenDebug(tok->getTokenDebug());
270+
if (tok->isExpandedMacro())
271+
tok2->setMacroName(tok->getMacroName());
270272

271273
// Check for links and fix them up
272274
if (Token::Match(tok2, "(|[|{"))

0 commit comments

Comments
 (0)